aboutsummaryrefslogtreecommitdiff
path: root/.config/waybar/scripts/idleinhibit.sh
diff options
context:
space:
mode:
authorJustine Smithies <justine@smithies.me.uk>2026-04-15 11:34:34 +0100
committerJustine Smithies <justine@smithies.me.uk>2026-04-15 11:34:34 +0100
commit5c242d4edf60a88dd630d9eb6824b7c091eb840c (patch)
treedc68270cfaed7eef2fa45b0559733d4fac6f4ab3 /.config/waybar/scripts/idleinhibit.sh
parentf778140e1b85f42ace17b3f51d6dac4c8ce09ff6 (diff)
Initial commit for running mango ( Wayland ) on OpenBSD
Diffstat (limited to '.config/waybar/scripts/idleinhibit.sh')
-rwxr-xr-x.config/waybar/scripts/idleinhibit.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/.config/waybar/scripts/idleinhibit.sh b/.config/waybar/scripts/idleinhibit.sh
new file mode 100755
index 0000000..c24f715
--- /dev/null
+++ b/.config/waybar/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/river/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
+ printf "%s" "$icon "
+ ;;
+esac