diff --git a/dots/.config/hypr/scripts/launchers/events-monitor.bash b/dots/.config/hypr/scripts/launchers/events-monitor.bash index 92540cc5..3f4544ea 100755 --- a/dots/.config/hypr/scripts/launchers/events-monitor.bash +++ b/dots/.config/hypr/scripts/launchers/events-monitor.bash @@ -30,5 +30,23 @@ monitor-ssid() { done } +monitor-laptop-lid() { + local laptop_lid_state + while :; do + laptop_lid_state="$(/dev/null; then + hyprctl keyword monitor "eDP-1, disable" >/dev/null && printf "Disabled laptop screen as the laptop was shut\n" + fi + ;; + esac + sleep 1 + done +} + monitor-ssid & +monitor-laptop-lid & wait