1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Hyprland integration
`dashboard.lua` is a section for the Lua-based Hyprland config in
`~/.config/hypr/`. It is not sourced automatically; wire it in once:
ln -s ~/Programming/GIT/conky-theme-udt/hypr/dashboard.lua \
~/.config/hypr/sections/dashboard.lua
and add to `~/.config/hypr/hyprland.lua`:
require("sections.dashboard")
## One change to make by hand
`sections/autostart.lua` runs `hl.exec_cmd("conky")`, which starts the old
desktop-layer conky. The dashboard replaces it, so change that line to:
hl.exec_cmd("[workspace special:dash silent] conky -c ~/.config/conky/conky.conf")
Leaving both would run two conky instances.
Name the config explicitly: the default lookup finds the same file, but udt's
`install.sh` launches it the same way, and two launch paths that disagree in
form later drift apart in effect.
The `[workspace special:dash silent]` prefix matters. The window rule in
`dashboard.lua` puts the dashboard on that workspace but cannot suppress the
switch, because `hl.window_rule` rejects `silent` ("unknown field"), so without
the prefix the dashboard pops open at login. The btop scratchpad uses the same
form.
## Bindings
`SUPER+S` toggles the dashboard. `SUPER+D` is already taken by the unnamed
special workspace, and that workspace also hosts the btop scratchpad, which is
why the dashboard uses its own `special:dash`.
The bind is written with a literal `"SUPER"` rather than `hl.mainMod`:
`keybindings.lua` declares `mainMod` as a file-local, so it is not visible to
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`.
`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'
|