diff --git a/.config/sway/scripts/clamshell.sh b/.config/sway/scripts/clamshell.sh index 3445910..e25072a 100644 --- a/.config/sway/scripts/clamshell.sh +++ b/.config/sway/scripts/clamshell.sh @@ -1,6 +1,8 @@ #!/usr/bin/bash -if cat /proc/acpi/button/lid/*/state | grep -q open; then - swaymsg output eDP-1 enable -else - swaymsg output eDP-1 disable +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