Add Idle Inhibitor

This commit is contained in:
Stephan Raabe
2023-12-14 18:24:40 +01:00
parent 68b7e7e623
commit 201bedcc26
14 changed files with 81 additions and 7 deletions

11
hypr/scripts/swayidle.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
pgrep_output=$(pgrep swayidle)
pgrep_arr=($pgrep_output)
if [[ "${#pgrep_arr[@]}" == "1" ]] || [[ "${#pgrep_arr[@]}" == "0" ]]; then
echo "Swayidle is not running. Starting Swayidle."
./lockscreentime.sh
else
echo "Swayidle is running. Killing swayidle."
killall swayidle
fi