diff options
| author | Ja.KooLit <85185940+JaKooLit@users.noreply.github.com> | 2024-09-14 23:11:18 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-14 23:11:18 +0900 |
| commit | f5f8bd520161d6e11e2f0cd2e4291d7c09f2fe9d (patch) | |
| tree | df47914810780d547649f6199f2eda9f69fa89ab /config/hypr/scripts | |
| parent | e099788a2743502fd960ddebfb294f275d7e603e (diff) | |
| parent | be1a509ab0d637206b295b3d20e478aa033497dc (diff) | |
Merge pull request #436 from JaKooLit/development
Development to Main
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/Hypridle.sh | 23 |
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 |
