blob: 5792791fc2abea1eb446638f7de1b832ba2fdd4f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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)
|