check for acpi before getting lid state

This commit is contained in:
Alex R
2023-06-17 22:41:05 -05:00
parent 8d9880c11e
commit 717fdadf3a

View File

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