diff options
Diffstat (limited to 'config/hypr/lua/laptop-lid.lua')
| -rw-r--r-- | config/hypr/lua/laptop-lid.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/config/hypr/lua/laptop-lid.lua b/config/hypr/lua/laptop-lid.lua new file mode 100644 index 00000000..5792791f --- /dev/null +++ b/config/hypr/lua/laptop-lid.lua @@ -0,0 +1,22 @@ +-- # ================================================== +-- # KoolDots (2026) +-- # Project URL: https://github.com/LinuxBeginnings +-- # License: GNU GPLv3 +-- # SPDX-License-Identifier: GPL-3.0-or-later +-- # ================================================== +-- +-- Sample code to handle disbling eDP-1 when lid closed +-- Code written by @star on TheBlacDon's discord server +-- Thank you +-- +-- 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) |
