/ de-omarchy / bin / omarchy-hw-laptop-closed
swadhinbiswas Initial de-omarchy: Omarchy UI layer for Arch-based distros · 8/22/2026
9f393b2
12 lines · 233 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

# omarchy:summary=Returns true when the laptop lid is closed
# omarchy:hidden=true

for state in /proc/acpi/button/lid/*/state; do
  [[ -r $state ]] || continue
  [[ $(< "$state") == *"closed"* ]] && exit 0
done

exit 1