swayDotfiles/sway/scripts/clamshell.sh
2024-12-14 18:24:03 +01:00

9 lines
186 B
Bash
Executable File

#!/usr/bin/bash
if [-d "/proc/acpi" ]; then
if cat /proc/acpi/button/lid/*/state | grep -q open; then
swaymsg output eDP-1 enable
else
swaymsg output eDP-1 disable
fi
fi