Added Sway Configuration

This commit is contained in:
Paul Fey 2024-10-10 16:30:36 +02:00
parent a4bfd41951
commit 85e325f0ce
3 changed files with 281 additions and 0 deletions

12
sway/lock.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
LAPTOP_OUTPUT="LVDS-1"
LID_STATE_FILE="/proc/acpi/button/lid/LID0/state"
read -r LS < "$LID_STATE_FILE"
case "$LS" in
*open) swaymsg output "$LAPTOP_OUTPUT" enable ;;
*closed) swaymsg output "$LAPTOP_OUTPUT" disable ;;
*) echo "Could not get lid state" >&2 ; exit 1 ;;
esac