Handle clamshell monitor hotplug

This commit is contained in:
David Heinemeier Hansson committed 2026-06-22 21:48:35 +02:00
1 parent 4772f01148
commit ee65304b92
6 files changed
+72 -16

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
# omarchy:summary=Returns true when clamshell mode is active
# omarchy:hidden=true
lid_closed=false
for state in /proc/acpi/button/lid/*/state; do
[[ -r $state ]] || continue
if [[ $(< "$state") == *"closed"* ]]; then
lid_closed=true
break
fi
done
[[ $lid_closed == "true" ]] && omarchy-hw-external-monitors