aboutsummaryrefslogtreecommitdiff
path: root/bin/clamshell-toggle
diff options
context:
space:
mode:
authorAlec Goncharow <alec@goncharow.dev>2022-12-04 18:23:46 -0600
committerAlec Goncharow <alec@goncharow.dev>2022-12-04 18:23:46 -0600
commit1ec73cc2c14d2f62c32046d9585c3a745531d37a (patch)
tree8b9c6b2e5ba43ce1248c114758a55df9467cab64 /bin/clamshell-toggle
parentb257edf16c9b8b14ebb542e857a29c74fea00495 (diff)
Fresh start
Diffstat (limited to 'bin/clamshell-toggle')
-rwxr-xr-xbin/clamshell-toggle6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/clamshell-toggle b/bin/clamshell-toggle
new file mode 100755
index 0000000..12997e9
--- /dev/null
+++ b/bin/clamshell-toggle
@@ -0,0 +1,6 @@
+#!/usr/bin/bash
+if grep -q open /proc/acpi/button/lid/LID0/state; then
+ swaymsg output eDP-1 enable
+else
+ swaymsg output eDP-1 disable
+fi