This commit is contained in:
Stephan Raabe
2024-05-30 14:05:19 +02:00
parent 6304aea7d5
commit 6e0bacd4f6
17 changed files with 126 additions and 49 deletions

View File

@@ -1,10 +1,25 @@
#!/bin/bash
# _ _ _ _ _
# | | | |_ _ _ __ _ __(_) __| | | ___
# | |_| | | | | '_ \| '__| |/ _` | |/ _ \
# | _ | |_| | |_) | | | | (_| | | __/
# |_| |_|\__, | .__/|_| |_|\__,_|_|\___|
# |___/|_|
#
SERVICE="hypridle"
if [[ "$1" == "status" ]]; then
sleep 1
if pgrep -x "$SERVICE" >/dev/null ;then
echo ":: $SERVICE is running"
echo '{"text": "RUNNING", "class": "active", "tooltip": "Screen locking active"}'
else
echo ":: $SERVICE is not running"
echo '{"text": "NOT RUNNING", "class": "notactive", "tooltip": "Screen locking deactivated"}'
fi
fi
if [[ "$1" == "toggle" ]]; then
if pgrep -x "$SERVICE" >/dev/null ;then
killall hypridle
else
hypridle &
fi
fi