1 2 3 4 5 6
#!/usr/bin/bash if grep -q open /proc/acpi/button/lid/LID0/state; then swaymsg output eDP-2 enable else swaymsg output eDP-2 disable fi