aboutsummaryrefslogtreecommitdiffstats
path: root/docs/superpowers/plans/2026-09-11-rofi-unified-theme.md
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-11 09:19:04 +0200
committerDanilo M. <danix@danix.xyz>2026-09-11 09:19:04 +0200
commit07447fc687665e2f9caac7050d8a6ee39c66dcae (patch)
treed488a4c1f5184bb097bc10601fdbcd021baa31ec /docs/superpowers/plans/2026-09-11-rofi-unified-theme.md
parentec0dacff5f9a273c2614c50e307db9fc245baf22 (diff)
downloadunified-desktop-theme-07447fc687665e2f9caac7050d8a6ee39c66dcae.tar.gz
unified-desktop-theme-07447fc687665e2f9caac7050d8a6ee39c66dcae.zip
docs: add headless parse checks and correct the rofi version
The plan claimed rofi 1.7.3, taken from a stale comment header in the user's config.rasi. The installed version is 2.0.0. Adds a `-dump-theme` parse check to the palette and each layout task. This catches syntax errors without a display, which the plan previously treated as impossible and deferred entirely to visual inspection. Every theme file in the plan was verified to parse cleanly on 2.0.0. Replaces the palette verification step, which built a throwaway wrapper theme via printf just to have something that draws. A palette defines variables and renders nothing, so there was nothing to look at; parsing is the real check. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G6aeE37K4GHBsaM51yLTTq
Diffstat (limited to 'docs/superpowers/plans/2026-09-11-rofi-unified-theme.md')
-rw-r--r--docs/superpowers/plans/2026-09-11-rofi-unified-theme.md69
1 files changed, 52 insertions, 17 deletions
diff --git a/docs/superpowers/plans/2026-09-11-rofi-unified-theme.md b/docs/superpowers/plans/2026-09-11-rofi-unified-theme.md
index ede0c05..6ae386c 100644
--- a/docs/superpowers/plans/2026-09-11-rofi-unified-theme.md
+++ b/docs/superpowers/plans/2026-09-11-rofi-unified-theme.md
@@ -6,18 +6,28 @@
**Architecture:** A fixed Macchiato palette file plus a single generated `@accent` variable. `udt-accent` extracts the wallpaper's signature color by calling pywal's colorz backend directly (which writes nothing, leaving the terminal's preset colors untouched) and snaps it to one of nine Macchiato accents by perceptual hue in CIELAB. Three layout files import a shared `common.rasi`; eleven call sites are repointed at them.
-**Tech Stack:** rofi 1.7.3 rasi themes, Python 3 (stdlib `math`/`sys`/`pathlib` plus `pywal.backends.colorz`), bash.
+**Tech Stack:** rofi 2.0.0 rasi themes (note: `~/.config/rofi/config.rasi` carries a stale "Version: 1.7.3" comment; `rofi -v` is the authority), Python 3 (stdlib `math`/`sys`/`pathlib` plus `pywal.backends.colorz`), bash.
**Repo note:** This project holds the canonical copies under `rofi/` and `bin/`. Installation is by symlink into `~/.config/rofi/udt/` and `~/bin/`, so the working config and the repo never diverge. Tasks 1-8 build and verify; Task 9 installs; Tasks 10-12 migrate call sites.
**Design spec:** `docs/superpowers/specs/2026-09-11-unified-desktop-theme-design.md`
-**On verification:** every rofi step in this plan opens a real window and is
-judged by eye. Rofi needs a display and cannot be usefully checked from a
-headless shell, where it exits non-zero for reasons unrelated to the theme. Run
-these steps in a terminal on the actual desktop session. A theme that fails to
-parse prints `Failed to parse theme:` with a line number; that message, not the
-exit code, is the failure signal.
+**On verification:** rofi steps come in two kinds.
+
+*Syntax* is checkable without a display, and every theme file should be checked
+this way before it is ever opened:
+
+```bash
+rofi -no-config -theme /absolute/path/to/theme.rasi -dump-theme >/dev/null
+```
+
+Silence means it parsed. A syntax error prints the problem and a line number.
+Use an absolute path: rofi resolves a bare name against its own theme
+directories, not the working directory.
+
+*Appearance* needs a real window and the user's eye, so those steps run in a
+terminal on the actual desktop session. Do not judge them by exit code; rofi
+exits non-zero for ordinary reasons such as dismissal with Escape.
---
@@ -153,12 +163,13 @@ Values are from the official `catppuccin/palette` repository. Create `rofi/udt/p
- [ ] **Step 2: Verify rofi parses it**
```bash
-mkdir -p /tmp/udt-check
-printf '@import "%s/rofi/udt/palette.rasi"\n* { background-color: @base; text-color: @text; }\n' "$PWD" > /tmp/udt-check/t.rasi
-echo probe | rofi -dmenu -theme /tmp/udt-check/t.rasi -e "palette parses"
+rofi -no-config -theme "$PWD/rofi/udt/palette.rasi" -dump-theme >/dev/null && echo "palette parses"
```
-Expected: a rofi window appears with a dark Macchiato background and no parse error printed to the terminal. Press Escape to dismiss. A parse failure prints `Failed to parse theme:` and is the failure signal.
+Expected: `palette parses`, with no error output. This needs no display.
+
+A palette on its own defines variables and draws nothing, so there is nothing
+to look at yet. Appearance is checked in Task 6, once a layout uses it.
- [ ] **Step 3: Commit**
@@ -628,7 +639,15 @@ listview {
}
```
-- [ ] **Step 2: Verify it renders**
+- [ ] **Step 2: Check it parses**
+
+```bash
+rofi -no-config -theme "$PWD/rofi/udt/list.rasi" -dump-theme >/dev/null && echo "list parses"
+```
+
+Expected: `list parses`. Fix any reported syntax error before opening a window.
+
+- [ ] **Step 3: Verify it renders**
```bash
printf 'alpha\nbravo\ncharlie\ndelta\n' | \
@@ -637,7 +656,7 @@ printf 'alpha\nbravo\ncharlie\ndelta\n' | \
Expected: a centered 680px window, Macchiato background, accent border, a search bar, and four rows. The selected row has an accent background with dark text. Press Escape.
-- [ ] **Step 3: Commit**
+- [ ] **Step 4: Commit**
```bash
git add rofi/udt/list.rasi
@@ -686,7 +705,15 @@ element {
}
```
-- [ ] **Step 2: Verify it renders**
+- [ ] **Step 2: Check it parses**
+
+```bash
+rofi -no-config -theme "$PWD/rofi/udt/menu.rasi" -dump-theme >/dev/null && echo "menu parses"
+```
+
+Expected: `menu parses`. Fix any reported syntax error before opening a window.
+
+- [ ] **Step 3: Verify it renders**
```bash
printf 'lock\nlogout\nreboot\nshutdown\n' | \
@@ -695,7 +722,7 @@ printf 'lock\nlogout\nreboot\nshutdown\n' | \
Expected: a compact 380px window with four rows and no search bar, matching the list layout's colors and border. Press Escape.
-- [ ] **Step 3: Commit**
+- [ ] **Step 4: Commit**
```bash
git add rofi/udt/menu.rasi
@@ -746,7 +773,15 @@ element-icon {
}
```
-- [ ] **Step 2: Verify it renders with real applications**
+- [ ] **Step 2: Check it parses**
+
+```bash
+rofi -no-config -theme "$PWD/rofi/udt/launcher.rasi" -dump-theme >/dev/null && echo "launcher parses"
+```
+
+Expected: `launcher parses`. Fix any reported syntax error before opening a window.
+
+- [ ] **Step 3: Verify it renders with real applications**
```bash
rofi -show drun -theme "$PWD/rofi/udt/launcher.rasi"
@@ -754,7 +789,7 @@ rofi -show drun -theme "$PWD/rofi/udt/launcher.rasi"
Expected: an 880px window, three columns of applications with icons at a larger size, and a working search bar. Typing filters the grid. Press Escape.
-- [ ] **Step 3: Commit**
+- [ ] **Step 4: Commit**
```bash
git add rofi/udt/launcher.rasi