aboutsummaryrefslogtreecommitdiffstats
path: root/hypr/dashboard.lua
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-16 20:02:23 +0200
committerDanilo M. <danix@danix.xyz>2026-09-16 20:02:23 +0200
commitb21deb0c6bfeca1c1af33875d55e7c26c62d0bba (patch)
treed0eacb859f76f3da5c00cdeff96a2754a10acac9 /hypr/dashboard.lua
parent0526541133e1d4cc2c4b7f291897734b120e7ebc (diff)
downloadconky-theme-udt-b21deb0c6bfeca1c1af33875d55e7c26c62d0bba.tar.gz
conky-theme-udt-b21deb0c6bfeca1c1af33875d55e7c26c62d0bba.zip
feat: add Hyprland placement rules and toggle
A Lua section, not a .conf fragment: the live Hyprland config is hyprland.lua requiring sections/, with rules declared through the hl helper API. Pins conky-dash to its own special:dash workspace, fullscreen, no border, no focus, and binds SUPER+S. Not SUPER+D, which keybindings.lua already binds to the unnamed special workspace, and that workspace already hosts the btop scratchpad. no_focus matters because the dashboard starts with the session: without it, it steals focus at login and can be tabbed to like an app. autostart.lua already launches a bare conky, so the README says to change that line rather than add one, which would run two instances. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'hypr/dashboard.lua')
-rw-r--r--hypr/dashboard.lua58
1 files changed, 58 insertions, 0 deletions
diff --git a/hypr/dashboard.lua b/hypr/dashboard.lua
new file mode 100644
index 0000000..344585a
--- /dev/null
+++ b/hypr/dashboard.lua
@@ -0,0 +1,58 @@
+-- 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` 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.
+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. `no_focus` is also unverified against real usage
+-- in this config, same caveat 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"))