summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-06-02 14:18:21 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-06-02 14:18:21 +0800
commit5db52f3594dd1f98b329bc1a325117c8c083b0e9 (patch)
treee059af5a2f765b5f61f50b8b3fa2fe51006e6e7b
parent4de7a3a65cd9500b4732341fe38674c3b9303f50 (diff)
added idle while online, so it wont use much system resources during use
-rwxr-xr-xidle.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/idle.sh b/idle.sh
index f1f03f9..50ac312 100755
--- a/idle.sh
+++ b/idle.sh
@@ -111,7 +111,10 @@ if [ "$1" ]; then
if [[ "$(xprintidle)" -gt $IDLETIME && ! -f $lockpath/$lockfile && $1 ]]; then # Changed from 600000 (10 minutes) to 3600000 (1 hour)
idle
continue
- elif [[ "$(xprintidle)" -le $IDLEBACKTIME && -f $lockpath/$lockfile ]]; then
+ else
+ sleep 10
+ fi
+ if [[ "$(xprintidle)" -le $IDLEBACKTIME && -f $lockpath/$lockfile ]]; then
stopidle
continue
else