Merge pull request #49 from theironrobin/main

check for acpi before getting lid state
This commit is contained in:
Johannes Kamprad
2023-06-18 19:58:43 +02:00
committed by GitHub

View File

@@ -1,6 +1,8 @@
#!/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