feat(config/hypr/configs): handle lid switch to toggle eDP-1 output

- New Feature: Bind switch events to enable/disable eDP-1 monitor
- Enhancement: Replace deprecated dpms dispatch with hl.monitor() calls
This commit is contained in:
sankalp committed 2026-05-21 00:01:45 +05:45
1 parent 7f5ac6457c
commit 191c68849b
1 file changed
+12
+12
View File
@@ -7,6 +7,18 @@ hl.monitor({
scale = 1,
})
-- Lid close: remove laptop panel from layout
hl.bind("switch:on:Lid Switch", function()
-- hl.dispatch(hl.dsp.dpms({ action = "disable", monitor = "eDP-1" }))
hl.monitor({ output = "eDP-1", disabled = true })
end)
-- Lid open: restore laptop panel
hl.bind("switch:off:Lid Switch", function()
-- hl.dispatch(hl.dsp.dpms({ action = "enable", monitor = "eDP-1" }))
hl.monitor({ output = "eDP-1", disabled = false })
end)
-- Env Vars
for key, val in pairs({