diff options
| author | Justine Smithies <justine@smithies.me.uk> | 2026-08-15 09:35:09 +0100 |
|---|---|---|
| committer | Justine Smithies <justine@smithies.me.uk> | 2026-08-15 09:35:09 +0100 |
| commit | a61da6f76813790bfaa2a995d9285d616b0b0a86 (patch) | |
| tree | 2bccdb95cf4c8bd1a67478626e4fbd660209044f /.config/cow/scripts/idleinhibit.sh | |
| parent | e14e6e48a276264397d1cc6feedeab9260e5930a (diff) | |
Initial commit of very WIP cow scripts
Diffstat (limited to '.config/cow/scripts/idleinhibit.sh')
| -rwxr-xr-x | .config/cow/scripts/idleinhibit.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.config/cow/scripts/idleinhibit.sh b/.config/cow/scripts/idleinhibit.sh new file mode 100755 index 0000000..1196cbe --- /dev/null +++ b/.config/cow/scripts/idleinhibit.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +# Swayidle toggle +toggle() { + if pgrep "swayidle" > /dev/null + then + pkill swayidle + notify-send --hint=string:x-canonical-private-synchronous:idleinhibit -u normal " Swayidle Inactive" + else + sh "$HOME/.config/cow/scripts/swayidle-update.sh" + notify-send --hint=string:x-canonical-private-synchronous:idleinhibit -u normal " Swayidle Active" + fi +} + +case $1 in + toggle) + toggle + ;; + *) + if pgrep "swayidle" > /dev/null + then + icon="" + else + icon="" + fi + echo "$icon" + ;; +esac |
