updated dots

This commit is contained in:
2026-01-14 11:28:55 +01:00
parent fe2e971850
commit 8c8ca7b0f2
10 changed files with 102 additions and 11 deletions

18
hypr/scripts/lid_handler.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
# ~/.config/hypr/scripts/lid_handler.sh
if [[ "$1" == "close" ]]; then
# Lid closed: disable laptop screen if any DP-* monitor is present
# Using 'all' to detect monitors even if they are currently disabled
if hyprctl monitors all | grep -q "Monitor DP-"; then
hyprctl keyword monitor "eDP-1, disable" # Disable laptop display
# Enable all detected DP-* monitors
for monitor in $(hyprctl monitors all | grep "Monitor DP-" | awk '{print $2}'); do
hyprctl keyword monitor "$monitor, enable"
done
fi
elif [[ "$1" == "open" ]]; then
# Lid opened: re-enable laptop screen
hyprctl keyword monitor "eDP-1, enable"
fi