diff --git a/README.md b/README.md index 5cfa2e7..1855541 100644 --- a/README.md +++ b/README.md @@ -49,8 +49,8 @@ unexercised: `retint.sh`, `opacity.sh`, `buttons.sh`, `whichbg.sh`, `icons.sh`, | portal preference | `prefer-light` | `prefer-dark` | Shared by both, and defined once in `theme.env`: Breeze application style, no desktop -layout, buttons on the right (`ButtonsOnLeft=M`, `ButtonsOnRight=IAX`), the Aurorae -plugin id, and the `kwinrc` group name. Panel at 65% and popups at 75%. +layout, button positions (`BUTTONS_LEFT=M`, `BUTTONS_RIGHT=IAX`), the Aurorae plugin id, +and the `kwinrc` group name. Panel at 65% and popups at 75%. **The application style is checked, not just reported.** `contents/defaults` sets `widgetStyle`, so a different live value means either `plasma-apply-lookandfeel` did not @@ -162,7 +162,9 @@ than two unrelated icon packs. `install.sh` refuses to `--apply` if the icon theme is missing, rather than applying a global theme that points at icons you do not have. `--force-icons` overrides. -`uninstall.sh` restores your previous icon theme but leaves Slot on disk. +Default `uninstall.sh` switches the appearance settings to stock Breeze and leaves the +Slot files on disk. Use `--restore-backup` to replay the previously recorded icon-theme +setting. ## Cursors @@ -749,8 +751,8 @@ build. 12px buttons — upstream Moe's geometry. Raise `TitleHeight` and `ButtonWidth`/`ButtonHeight` in `rc`, or use `bin/buttons.sh --base`. - **No menu-button artwork.** Moe ships no `menu.svg`, so the `M` button falls back to - the window icon. If that looks wrong, set `ButtonsOnLeft=` (empty) in - `packaging/stamp-metadata.py` and re-stamp. + the window icon. If that looks wrong, set `BUTTONS_LEFT=""` in `theme.env`, then run + `python3 packaging/stamp-metadata.py` to regenerate the defaults before installing. - **Content Credentials get injected on copy.** Copying files to this host through a file bridge signs every *image* with a C2PA provenance manifest — about 7.7 KiB of base64 inside `` in each SVG. Harmless to rendering (QSvg ignores ``) but diff --git a/lib/common.sh b/lib/common.sh index 423cf4e..4b72fad 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -86,7 +86,7 @@ quantum_vdir() { printf '%s\n' "$QUANTUM_ROOT/variants/$1"; } quantum_src_aurorae() { printf '%s\n' "$QUANTUM_ROOT/variants/$1/aurorae/$(quantum_variant_get "$1" ID)"; } QUANTUM_REQUIRED_KEYS=(SLUG ID NAME BASE_SCHEME ICON_THEME ICON_SUBDIR CURSOR_THEME PORTAL_PREF GTK_PREFER_DARK STOCK_LNF - WIDGET_STYLE BUTTONS_LEFT BUTTONS_RIGHT AURORAE_PLUGIN KDECORATION_GROUP) + WIDGET_STYLE BUTTONS_RIGHT AURORAE_PLUGIN KDECORATION_GROUP) quantum_init() { QUANTUM_ARGS=() @@ -128,6 +128,7 @@ quantum_init() { for k in "${QUANTUM_REQUIRED_KEYS[@]}"; do [[ -n "${!k:-}" ]] || die "variants/$want/variant.env does not define $k" done + [[ ${BUTTONS_LEFT+x} ]] || die "theme.env does not define BUTTONS_LEFT" [[ "$SLUG" == "$want" ]] || die "variants/$want/variant.env says SLUG=$SLUG" # ---- derived, so no script computes these twice -------------------------- diff --git a/packaging/make-release.sh b/packaging/make-release.sh index 0fcea1d..096b218 100755 --- a/packaging/make-release.sh +++ b/packaging/make-release.sh @@ -54,7 +54,7 @@ say "pre-release checks" ./tests/run-tests.sh || die "tests failed - not building a release" command -v git >/dev/null && [[ -d .git ]] && { - [[ -z "$(git status --porcelain)" ]] || say "note: working tree is dirty; the source tarball is built from disk, not from HEAD" + [[ -z "$(git status --porcelain)" ]] || say "note: working tree is dirty; both source and package artifacts are built from disk" } # ---- build ------------------------------------------------------------------- @@ -84,11 +84,7 @@ done # the whole repo: the install path the README documents src_out="$DIST/quantum-theme-$VER.tar.gz" -if [[ -d .git ]] && command -v git >/dev/null; then - git archive --format=tar.gz --prefix="quantum-theme-$VER/" -o "$src_out" HEAD -else - tar czf "$src_out" "${TARFLAGS[@]}" --exclude='./dist' --transform "s|^\.|quantum-theme-$VER|" . -fi +tar czf "$src_out" "${TARFLAGS[@]}" --exclude='./dist' --transform "s|^\.|quantum-theme-$VER|" . say "$(basename "$src_out") ($(du -h "$src_out" | cut -f1))" ( cd "$DIST" && sha256sum ./*.tar.gz > SHA256SUMS ) diff --git a/packaging/stamp-metadata.py b/packaging/stamp-metadata.py index 8d48e72..01ed011 100755 --- a/packaging/stamp-metadata.py +++ b/packaging/stamp-metadata.py @@ -108,7 +108,8 @@ def read_env(path): if not line or line.startswith("#") or "=" not in line: continue k, v = line.split("=", 1) - out[k.strip()] = shlex.split(v)[0] if v else "" + values = shlex.split(v) + out[k.strip()] = values[0] if values else "" return out diff --git a/tests/unit/test_install.sh b/tests/unit/test_install.sh index d68d310..0f7a4ae 100755 --- a/tests/unit/test_install.sh +++ b/tests/unit/test_install.sh @@ -119,4 +119,17 @@ out="$(run install.sh --variant light --aply)" assert_eq "a typo'd flag exits non-zero" 1 "$(status)" assert_contains "and is named" "$out" "--aply" +describe "an empty left-button position is valid" +sandbox_reset +seed_icon_theme Slot-Light-Icons +sed -i 's/^BUTTONS_LEFT=.*/BUTTONS_LEFT=""/' "$QUANTUM_ROOT/theme.env" +python3 "$QUANTUM_ROOT/packaging/stamp-metadata.py" >/dev/null +assert_contains "generated defaults preserve the empty value" \ + "$(cat "$QUANTUM_ROOT/variants/light/look-and-feel/QuantumLight/contents/defaults")" \ + "ButtonsOnLeft=" +out="$(run install.sh --variant light --apply)" +assert_eq "the install accepts the empty setting" 0 "$(status)" +assert_eq "and the live KWin setting is empty" "" \ + "$(kcfg kwinrc org.kde.kdecoration2 ButtonsOnLeft)" + finish