dotfiles/files/.config/sway/clamshell.sh
2025-04-25 13:46:59 +02:00

12 lines
226 B
Bash
Executable File

#!/bin/sh
LID_STATE=$(cat /proc/acpi/button/lid/*/state)
case "$LID_STATE" in
*open) ACTION="enable" ;;
*closed) ACTION="disable" ;;
*) echo "unable to identify lid state"; exit ;;
esac
swaymsg output "eDP-1" $ACTION