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 /hypr | |
| 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 'hypr')
| -rw-r--r-- | hypr/README.md | 25 | ||||
| -rw-r--r-- | hypr/dashboard.lua | 12 |
2 files changed, 26 insertions, 11 deletions
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" }, |
