Keep the DMS bar visible for fullscreen programs

Programs that go fullscreen on their own (F11, RDP, video) are shown
maximized below the bar while still believing they are fullscreen
(window.fullscreen handler + fullscreen_state). Mod+F now maximizes with
the bar visible, Mod+Shift+F is real fullscreen without the bar.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-30 15:40:15 +05:00
co-authored by Claude Sonnet 5.5
parent 211b3e626c
commit 8937f03200
2 changed files with 20 additions and 4 deletions
+17 -2
View File
@@ -169,9 +169,15 @@ for key, d in pairs(dirs) do
end
-- layout
b(mod .. " + F", hl.dsp.window.fullscreen())
-- Mod+F maximizes (the DMS bar stays visible); Mod+Shift+F is real fullscreen without the bar.
b(mod .. " + F", hl.dsp.window.fullscreen({ mode = "maximized" }))
b(mod .. " + SHIFT + F", function()
local w = hl.get_active_window()
if not w then return end
if w.fullscreen ~= 2 then HL_FS_REAL = true end -- let the handler below leave this one alone
hl.dispatch(hl.dsp.window.fullscreen({ mode = "fullscreen" }))
end)
b(mod .. " + SHIFT + SPACE", hl.dsp.window.float({ action = "toggle" }))
b(mod .. " + SHIFT + F", hl.dsp.window.float({ action = "toggle" }))
b(mod .. " + C", hl.dsp.window.center())
b(mod .. " + E", hl.dsp.layout("togglesplit"))
b(mod .. " + P", hl.dsp.window.pseudo())
@@ -241,6 +247,15 @@ b("XF86AudioPlay", dms("mpris playPause"), { locked = true })
b("XF86AudioNext", dms("mpris next"), { locked = true })
b("XF86AudioPrev", dms("mpris previous"), { locked = true })
-- Programs that go fullscreen on their own (F11, RDP, video) keep the DMS bar visible: Hyprland shows them
-- maximized (1) while the program still believes it is fullscreen (2).
HL_FS_REAL = false
hl.on("window.fullscreen", function(w)
if not w or w.fullscreen ~= 2 then return end
if HL_FS_REAL then HL_FS_REAL = false; return end -- requested with Mod+Shift+F: keep it real
hl.dispatch(hl.dsp.window.fullscreen_state({ internal = 1, client = w.fullscreen_client, window = "address:" .. w.address }))
end)
-----------------
---- RULES ------
-----------------