From ebc627939ca72e6140a7011b06bcbed0715982dc Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 20 Feb 2014 12:34:11 +0100 Subject: Switch screensaver back on only once. Fixed variable error --- bin/adjust_dpms | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'bin/adjust_dpms') diff --git a/bin/adjust_dpms b/bin/adjust_dpms index 758541e..76d2bd5 100755 --- a/bin/adjust_dpms +++ b/bin/adjust_dpms @@ -23,7 +23,7 @@ do re='^[0-9]+$' if [[ $pid =~ $re ]]; then echo "$i running ($pid)" - $blankoff=1 + blankoff=1 fi done @@ -34,7 +34,7 @@ do re='^[0-9]+$' if [[ $pid =~ $re ]]; then echo "$i running ($pid)" - $blankoff=1 + blankoff=1 fi done @@ -43,7 +43,12 @@ if [ $blankoff -gt 0 ]; then echo "$blankoff" echo "Some program requires screensaver to be off." xset s off +# else set 360 seconds as blank time else - xset s on + xsetq=$(xset q|grep timeout|awk '{print $2}') + if [ $xsetq -eq 0 ];then +# xset s 360 360 + xset s on + fi fi -- cgit v1.2.3-70-g09d2