-- Conky Lua dashboard: window placement and toggle. -- -- Copy or symlink into ~/.config/hypr/sections/ and add to hyprland.lua: -- require("sections.dashboard") -- -- The dashboard is a normal toplevel, not a desktop-layer surface, which is -- what lets a window rule put it on a workspace at all. -- Its own named special workspace: the unnamed `special` already hosts the -- btop scratchpad. local WS = "special:dash" hl.window_rule({ name = "dash-workspace", match = { class = "conky-dash" }, workspace = WS, }) hl.window_rule({ name = "dash-float", match = { class = "conky-dash" }, float = true, }) -- `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 ''", 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" }, fullscreen = true, }) hl.window_rule({ name = "dash-no-border", match = { class = "conky-dash" }, border_size = 0, }) hl.window_rule({ name = "dash-no-rounding", match = { class = "conky-dash" }, rounding = 0, }) -- 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. Validity checked the same way as `fullscreen` -- above. hl.window_rule({ name = "dash-no-focus", match = { class = "conky-dash" }, no_focus = true, }) -- SUPER+S, not SUPER+D: keybindings.lua already binds D to the unnamed special -- workspace. -- -- Literal "SUPER", not hl.mainMod: mainMod is a file-local in -- keybindings.lua (`local mainMod = "SUPER"`), not exported on hl, so -- hl.mainMod is nil here. hl.bind("SUPER + s", hl.dsp.workspace.toggle_special("dash"))