fix(hypr): properly disable laptop monitor on close
This only shuts off the laptop monitor if there's more than 1 monitor detected. If there's only 1 detected then that's the laptop screen and that will get shut off on lid close by systemd for suspend.
This commit is contained in:
parent
89a67931d3
commit
5b7cb294df
11
dots/.config/hypr/scripts/disable-laptop-screen.bash
Executable file
11
dots/.config/hypr/scripts/disable-laptop-screen.bash
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
main() {
|
||||
local mon_count
|
||||
mon_count="$(hyprctl monitors -j | jq length)"
|
||||
if (( mon_count > 1 )); then
|
||||
hyprctl keyword monitor "eDP-1, disable"
|
||||
fi
|
||||
}
|
||||
|
||||
main
|
@ -1,4 +1,4 @@
|
||||
monitor = , preferred, auto, 1
|
||||
monitor=eDP-1,preferred,auto,1.4
|
||||
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:on:Lid Switch,exec,~/.config/hypr/scripts/disable-laptop-screen.bash
|
||||
|
Loading…
Reference in New Issue
Block a user