From 191c68849ba3e29da5e0500fb836d935eb840e8d Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Thu, 21 May 2026 00:01:45 +0545 Subject: [PATCH] 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 --- config/hypr/configs/monitor_and_env.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config/hypr/configs/monitor_and_env.lua b/config/hypr/configs/monitor_and_env.lua index 1f380389..322a54fe 100644 --- a/config/hypr/configs/monitor_and_env.lua +++ b/config/hypr/configs/monitor_and_env.lua @@ -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({