From 06a6ec5bc87701ced2845a27d322633d2efdbd52 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Sun, 26 Jul 2026 21:24:29 -0400 Subject: Added event driven disable of eDP-1 on lid close On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: config/hypr/UserConfigs/Laptops.conf modified: config/hypr/UserConfigs/user_laptops.lua --- config/hypr/UserConfigs/Laptops.conf | 4 ++-- config/hypr/UserConfigs/user_laptops.lua | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/hypr/UserConfigs/Laptops.conf b/config/hypr/UserConfigs/Laptops.conf index b4e3cbdc..fefc0d80 100644 --- a/config/hypr/UserConfigs/Laptops.conf +++ b/config/hypr/UserConfigs/Laptops.conf @@ -15,8 +15,8 @@ $UserConfigs = $HOME/.config/hypr/UserConfigs # Suggest you edit below for your laptop display # From WIKI This is to disable laptop monitor when lid is closed. # consult https://wiki.hyprland.org/hyprland-wiki/pages/Configuring/Binds/#switches -#bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, preferred, auto, 1" -#bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable" +bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, preferred, auto, 1" +bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable" # WARNING! Using this method has some caveats!! USE THIS PART WITH SOME CAUTION! diff --git a/config/hypr/UserConfigs/user_laptops.lua b/config/hypr/UserConfigs/user_laptops.lua index ac3c7f8c..b75a473f 100644 --- a/config/hypr/UserConfigs/user_laptops.lua +++ b/config/hypr/UserConfigs/user_laptops.lua @@ -10,3 +10,13 @@ -- Examples: -- hl.monitor({ output = "eDP-1", mode = "preferred", position = "auto", scale = "1" }) -- hl.monitor({ output = "eDP-1", disabled = true }) + +-- Lid close: remove laptop panel from layout +hl.bind("switch:on:Lid Switch", function() + hl.monitor({ output = "eDP-1", disabled = true }) +end) + +-- Lid open: restore laptop panel +hl.bind("switch:off:Lid Switch", function() + hl.monitor({ output = "eDP-1", disabled = false }) +end) -- cgit v1.2.3