From bf21fecf2abb87f1cc155457fba6186516c7b6b3 Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 20 Feb 2014 02:15:57 +0100 Subject: Fixing script for usage with root by adding export=DISPLAY --- bin/adjust_dpms | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'bin/adjust_dpms') diff --git a/bin/adjust_dpms b/bin/adjust_dpms index 65f5e0d..758541e 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 @@ -32,14 +32,15 @@ for i in "${python2[@]}" do pid=$(pidof python2 $i) re='^[0-9]+$' - if [[ $pid =~ $re ]]; then + if [[ $pid =~ $re ]]; then echo "$i running ($pid)" - blankoff=1 + $blankoff=1 fi done # if valuable programs are running, don't use screen blanking -if [ blankoff ]; then +if [ $blankoff -gt 0 ]; then + echo "$blankoff" echo "Some program requires screensaver to be off." xset s off else -- cgit v1.2.3-54-g00ecf