#!/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
