mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-05 20:28:25 +02:00
23 lines
499 B
Bash
Executable File
23 lines
499 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Toggle idle behavior so the system either idles normally or stays awake
|
|
|
|
if ! state=$(omarchy-shell idle toggle); then
|
|
exit 1
|
|
fi
|
|
|
|
case $state in
|
|
enabled)
|
|
omarchy-notification-send -g "" "Idle behavior on" "System can now lock on idle"
|
|
;;
|
|
disabled)
|
|
omarchy-notification-send -g "" "Staying awake" "Idle behavior disabled"
|
|
;;
|
|
*)
|
|
echo "Unexpected idle state: $state" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
omarchy-shell bar refreshIndicators >/dev/null 2>&1 || true
|