From ef857234613f5c2ef2506c4aca1752287ab9e71b Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 30 Nov 2026 13:18:27 +0100 Subject: hypr: SUPER+S focuses DP-1 before toggling the dashboard A special workspace opens on whichever monitor has focus and ignores the workspace rule's monitor. Opened from DP-3, the floating window took DP-3's origin and kept it after the workspace moved back to DP-1, so the 2560-wide dashboard straddled both monitors. The bind now focuses DP-1 first, so the dashboard always opens there. Co-Authored-By: Claude Opus 5.5 --- hypr/dashboard.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'hypr/dashboard.lua') diff --git a/hypr/dashboard.lua b/hypr/dashboard.lua index e89a5b1..e8888cb 100644 --- a/hypr/dashboard.lua +++ b/hypr/dashboard.lua @@ -18,7 +18,7 @@ local WS = "special:dash" -- what makes it look like it works. -- -- Kept so the intent is recorded and the line is ready if upstream fixes it. --- Until then the procedure is manual: focus DP-1 before SUPER+S. The conky +-- The SUPER+S bind below works around it by focusing DP-1 first. The conky -- surface is a fixed 2560x1080 (Hyprland's fullscreen rule resizes the window -- but not the drawing surface), so on the 1920-wide DP-3 it is cropped, and -- the window STAYS on DP-3 once opened there, so the next toggle is cropped @@ -82,6 +82,10 @@ hl.window_rule({ -- keybindings.lua (`local mainMod = "SUPER"`), not exported on hl, so -- hl.mainMod is nil here. -- --- Focus DP-1 before pressing this. The workspace rule above cannot do it, --- and the dashboard opens on whichever monitor has focus. -hl.bind("SUPER + s", hl.dsp.workspace.toggle_special("dash"), { description = "Workspaces: Toggle dashboard" }) +-- Focuses DP-1 first: the workspace rule above cannot pin the special +-- workspace, and opened from DP-3 the floating window kept DP-3's origin even +-- after the workspace moved to DP-1, straddling both monitors. +hl.bind("SUPER + s", function() + hl.dispatch(hl.dsp.focus({ monitor = "DP-1" })) + hl.dispatch(hl.dsp.workspace.toggle_special("dash")) +end, { description = "Workspaces: Toggle dashboard" }) -- cgit v1.2.3