aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr
diff options
context:
space:
mode:
authorJaKooLit <ejhay.games@gmail.com>2024-09-13 11:03:20 +0900
committerJaKooLit <ejhay.games@gmail.com>2024-09-13 11:03:20 +0900
commit6c99347a62111f6ca23bf16c841d2cf1673b69b6 (patch)
treec5121c99ee9a528c3abd48f5480850d9f0739cfb /config/hypr
parent6c526a514f2ad8502b1285fcb3c43f8d973fb32d (diff)
custom idle inhibitor on waybar which kills hypridle when toggled
Diffstat (limited to 'config/hypr')
-rwxr-xr-xconfig/hypr/scripts/Hypridle.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/config/hypr/scripts/Hypridle.sh b/config/hypr/scripts/Hypridle.sh
new file mode 100755
index 00000000..56176716
--- /dev/null
+++ b/config/hypr/scripts/Hypridle.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# This is for custom version of waybar idle_inhibitor which activates / deactivates hypridle instead
+
+PROCESS="hypridle"
+
+if [[ "$1" == "status" ]]; then
+ sleep 1
+ if pgrep -x "$PROCESS" >/dev/null; then
+ echo '{"text": "RUNNING", "class": "active", "tooltip": "idle_inhibitor NOT ACTIVE\nLeft Click: Activate\nRight Click: Lock Screen"}'
+ else
+ echo '{"text": "NOT RUNNING", "class": "notactive", "tooltip": "idle_inhibitor is ACTIVE\nLeft Click: Deactivate\nRight Click: Lock Screen"}'
+ fi
+elif [[ "$1" == "toggle" ]]; then
+ if pgrep -x "$PROCESS" >/dev/null; then
+ pkill "$PROCESS"
+ else
+ "$PROCESS"
+ fi
+else
+ echo "Usage: $0 {status|toggle}"
+ exit 1
+fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage