aboutsummaryrefslogtreecommitdiff
path: root/.config/sway/clamshell.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/sway/clamshell.sh')
-rwxr-xr-x.config/sway/clamshell.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/.config/sway/clamshell.sh b/.config/sway/clamshell.sh
new file mode 100755
index 0000000..b5b9388
--- /dev/null
+++ b/.config/sway/clamshell.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env sh
+
+laptop_screen=eDP-1
+
+if grep -q open /proc/acpi/button/lid/LID/state; then
+ swaymsg output $laptop_screen enable
+else
+ swaymsg output $laptop_screen disable
+fi