From 5db52f3594dd1f98b329bc1a325117c8c083b0e9 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 2 Jun 2024 14:18:21 +0800 Subject: added idle while online, so it wont use much system resources during use --- idle.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3