aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/superpowers/plans/2026-09-16-conky-lua-dashboard.md46
-rw-r--r--hypr/README.md25
-rw-r--r--hypr/dashboard.lua12
3 files changed, 62 insertions, 21 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
diff --git a/hypr/README.md b/hypr/README.md
index 90a5f4d..8e81bdc 100644
--- a/hypr/README.md
+++ b/hypr/README.md
@@ -32,8 +32,23 @@ other sections.
## Rule keys
`workspace`, `float`, `border_size` and `rounding` are all used by existing
-rules in `sections/look_and_feel.lua` and `sections/workspaces.lua`, so their
-spelling is confirmed. `fullscreen` and `no_focus` are not used anywhere else
-in this config; if the Lua runtime ignores them, the dashboard still lands on
-`special:dash` and can be sized with
-`size = "(monitor_w) (monitor_h)"` instead.
+rules in `sections/look_and_feel.lua` and `sections/workspaces.lua`.
+`fullscreen` and `no_focus` are used nowhere else in this config, so 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.
+
+## Testing the toggle by hand
+
+Under the Lua config, `hyprctl dispatch` evaluates its argument as Lua, so the
+plain Hyprland syntax does not work:
+
+ # wrong: ')' expected near 'dash'
+ hyprctl dispatch togglespecialworkspace dash
+
+ # right
+ hyprctl dispatch 'hl.dsp.workspace.toggle_special("dash")'
+
+Check which special workspace is showing with:
+
+ hyprctl monitors -j | jq -r '.[0].specialWorkspace.name'
diff --git a/hypr/dashboard.lua b/hypr/dashboard.lua
index 344585a..95ce454 100644
--- a/hypr/dashboard.lua
+++ b/hypr/dashboard.lua
@@ -20,10 +20,10 @@ hl.window_rule({
match = { class = "conky-dash" },
float = true,
})
--- `fullscreen` is not used by any other rule in this config, so unlike the
--- keys above it is unverified against real usage here; if Hyprland's Lua
--- runtime ignores it, the dashboard still lands on special:dash and can be
--- sized with `size = "(monitor_w) (monitor_h)"` instead.
+-- `fullscreen` appears in no other rule in this config, so it was checked
+-- against the runtime directly: hl.window_rule rejects an unknown field with
+-- "unknown field '<name>'", and both `fullscreen` and `no_focus` pass that
+-- check, so the Lua API does accept them.
hl.window_rule({
name = "dash-fullscreen",
match = { class = "conky-dash" },
@@ -41,8 +41,8 @@ hl.window_rule({
})
-- It is a dashboard, not a window: never let it take focus or be tabbed to.
-- This matters because it starts with the session, so without it the dashboard
--- would steal focus at login. `no_focus` is also unverified against real usage
--- in this config, same caveat as `fullscreen` above.
+-- would steal focus at login. Validity checked the same way as `fullscreen`
+-- above.
hl.window_rule({
name = "dash-no-focus",
match = { class = "conky-dash" },