diff options
Diffstat (limited to 'config/hypr')
| -rw-r--r-- | config/hypr/UserConfigs/Laptops.conf | 4 | ||||
| -rw-r--r-- | config/hypr/UserConfigs/user_laptops.lua | 10 |
2 files changed, 12 insertions, 2 deletions
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) |
