diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-16 20:05:37 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-16 20:05:37 +0200 |
| commit | 03d3d2a95b417208499fb1f9f9aeed217260cc2e (patch) | |
| tree | 0b706c98e99f12c6d5b45d4d3e7ef202e3b0dab0 /docs | |
| parent | b21deb0c6bfeca1c1af33875d55e7c26c62d0bba (diff) | |
| download | conky-theme-udt-03d3d2a95b417208499fb1f9f9aeed217260cc2e.tar.gz conky-theme-udt-03d3d2a95b417208499fb1f9f9aeed217260cc2e.zip | |
docs: fix the toggle syntax and verify the unusual rule keys
Four defects, all found while running Task 8.
The documented toggle command does not work on this machine. Under the
Lua config `hyprctl dispatch` evaluates its argument as Lua, so the
plain `hyprctl dispatch togglespecialworkspace dash` fails with "')'
expected near 'dash'"; Hyprland even says so in its error. The working
form is `hyprctl dispatch 'hl.dsp.workspace.toggle_special("dash")'`,
verified toggling special:dash on and off. Also read the result from
`monitors[0].specialWorkspace.name`, since activeworkspace keeps
reporting the ordinary workspace underneath.
`fullscreen` and `no_focus` appear in no existing rule, so they were
checked against the runtime rather than left as caveats:
hl.window_rule rejects an unknown field with "unknown field '<name>'",
and neither produces that error, so both are accepted. A deliberate
bogus key confirmed the check itself works.
hl.mainMod is nil in any section other than keybindings.lua, which
declares `local mainMod = "SUPER"` and never exports it. The plan
hedged about this; it now states the literal to use.
Task 8's class check ran `conky -c ./conky.conf`, which is gitignored
generated output and absent on a fresh clone, so it now renders the
config first. Its `pkill -f` also matched the running script's own
command line and killed the shell's process group, returning 144 and
swallowing the log it had just been told to read; `pkill -x conky`
instead, fixed in Tasks 4 and 6 too.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/superpowers/plans/2026-09-16-conky-lua-dashboard.md | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/docs/superpowers/plans/2026-09-16-conky-lua-dashboard.md b/docs/superpowers/plans/2026-09-16-conky-lua-dashboard.md index c57bcbc..339e2f1 100644 --- a/docs/superpowers/plans/2026-09-16-conky-lua-dashboard.md +++ b/docs/superpowers/plans/2026-09-16-conky-lua-dashboard.md @@ -750,7 +750,10 @@ hyprctl dispatch workspace "$ws" >/dev/null; sleep 2 g=$(hyprctl clients -j | jq -r '.[]|select(.class=="conky-dash")|"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | head -1) grim -g "$g" /tmp/dash-task4.png && echo "captured $g" hyprctl dispatch workspace "$orig" >/dev/null -pkill -f 'conky -c ./conky.conf' +# pkill -x, not pkill -f: a -f pattern that matches this script's own +# command line kills the shell's process group, returning 144 and +# swallowing whatever command follows. +pkill -x conky cat /tmp/conky-dash.log ``` @@ -1031,7 +1034,10 @@ hyprctl dispatch workspace "$ws" >/dev/null; sleep 2 g=$(hyprctl clients -j | jq -r '.[]|select(.class=="conky-dash")|"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | head -1) grim -g "$g" /tmp/dash-clock.png && echo "captured $g" hyprctl dispatch workspace "$orig" >/dev/null -pkill -f 'conky -c ./conky.conf' +# pkill -x, not pkill -f: a -f pattern that matches this script's own +# command line kills the shell's process group, returning 144 and +# swallowing whatever command follows. +pkill -x conky cat /tmp/conky-dash.log ``` @@ -1278,13 +1284,17 @@ hl.window_rule({ -- SUPER+S, not SUPER+D: keybindings.lua already binds D to the unnamed special -- workspace. -hl.bind(hl.mainMod .. " + s", hl.dsp.workspace.toggle_special("dash")) +-- Literal "SUPER", not hl.mainMod: keybindings.lua declares +-- `local mainMod = "SUPER"`, a file-local never assigned onto hl, so +-- hl.mainMod is nil in any other section. +hl.bind("SUPER + s", hl.dsp.workspace.toggle_special("dash")) ``` -Note: `hl.mainMod` may not be exported; `keybindings.lua` uses a local -`mainMod`. If `hl.mainMod` is nil at load, replace that last line with the -literal modifier used in `keybindings.lua` (read its `mainMod` assignment with -`grep -n 'mainMod' ~/.config/hypr/sections/keybindings.lua | head -3`). +Note on the two unusual rule keys: `workspace`, `float`, `border_size` and +`rounding` all appear in existing rules, but `fullscreen` and `no_focus` appear +nowhere in this config. They were checked against the runtime instead: +`hl.window_rule` rejects an unknown field with `unknown field '<name>'`, and +neither of these produces that error, so the Lua API accepts both. - [ ] **Step 2: Verify it parses as Lua** @@ -1332,12 +1342,28 @@ why the dashboard uses its own `special:dash`. Do not assume the class matches; check it against a running instance. The rules are inert if the class in the config and the rules disagree. +`conky.conf` is gitignored generated output, so regenerate it first if it is +missing (Task 6's render command, repeated here so this step stands alone): + ```bash cd ~/Programming/GIT/conky-theme-udt +[ -f conky.conf ] || sed \ + -e 's/@SCHEME@/macchiato/' -e 's/@HEADING@/#8aadf4/' -e 's/@LABEL@/#a5adcb/' \ + -e 's/@RULE@/#494d64/' -e 's/@VALUE@/#8bd5ca/' -e 's/@HIGHLIGHT@/#c6a0f6/' \ + -e 's/@OK@/#a6da95/' -e 's/@CRITICAL@/#ed8796/' -e 's/@BODY@/#cad3f5/' \ + -e 's/@BODY_SHADE_RAW@/1e2030/' \ + -e 's/@BODY_OUTLINE@/#494d64/' -e 's/@BODY_SHADE@/#1e2030/' \ + -e "s|~/.config/conky/dashboard.lua|./dashboard.lua|" \ + conky.conf.in > conky.conf + (conky -c ./conky.conf >/tmp/conky-dash.log 2>&1 &) sleep 3 hyprctl clients -j | jq -r '.[]|select(.class=="conky-dash")|"class=\(.class) ws=\(.workspace.name) floating=\(.floating) size=\(.size)"' -pkill -f 'conky -c ./conky.conf' +# pkill -x, not pkill -f: a -f pattern matching this script's own command line +# kills the shell's process group, which returns 144 and swallows any command +# after it. +pkill -x conky +cat /tmp/conky-dash.log ``` Expected: one line with `class=conky-dash`. Nothing printed means the class is @@ -1605,7 +1631,7 @@ Run the parser and layout checks: Screenshot it, remembering that `grim` captures screen coordinates and so needs the dashboard's workspace to be the active one: - hyprctl dispatch togglespecialworkspace dash + hyprctl dispatch 'hl.dsp.workspace.toggle_special("dash")' sleep 1 grim -g "$(hyprctl clients -j | jq -r '.[]|select(.class=="conky-dash")|"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')" /tmp/dash.png @@ -1679,7 +1705,7 @@ Run after Task 10. Every item is a command with an expected result, not a judgem - [ ] No unsubstituted placeholders: `grep -c '@[A-Z_]*@' conky.conf` prints `0` - [ ] No Lua faults: `timeout 8 conky -c ~/.config/conky/conky.conf 2>&1 | grep 'dashboard error'` prints nothing - [ ] Window places correctly: `hyprctl clients -j | jq -r '.[]|select(.class=="conky-dash")|.workspace.name'` prints `special:dash` -- [ ] Toggle works: `hyprctl dispatch togglespecialworkspace dash` makes it visible, again hides it +- [ ] Toggle works: `hyprctl dispatch 'hl.dsp.workspace.toggle_special("dash")'` makes it visible, again hides it (the bare `togglespecialworkspace dash` form errors under the Lua config) - [ ] Clock is legible in a screenshot taken on its own workspace, and matches `idea2.png` in shape - [ ] Scheme switch recolours it: change `scheme` in `~/.config/udt/roles.conf`, run UDT's `install.sh`, see different hex in `conky.conf` - [ ] Both repos have signed commits: `git log --format='%h %G? %s' -5` shows `G` in each |
