diff options
author | David Runge <david.runge@frqrec.com> | 2014-02-20 02:15:57 +0100 |
---|---|---|
committer | David Runge <david.runge@frqrec.com> | 2014-02-20 02:15:57 +0100 |
commit | bf21fecf2abb87f1cc155457fba6186516c7b6b3 (patch) | |
tree | eaa5182e184300ac77c148e487ecc6d63fff2100 | |
parent | 3ac402837d84c7bb968ae8f51e6e21ec7c4cf724 (diff) | |
download | dotfiles-bf21fecf2abb87f1cc155457fba6186516c7b6b3.tar.gz dotfiles-bf21fecf2abb87f1cc155457fba6186516c7b6b3.tar.bz2 dotfiles-bf21fecf2abb87f1cc155457fba6186516c7b6b3.tar.xz dotfiles-bf21fecf2abb87f1cc155457fba6186516c7b6b3.zip |
Fixing script for usage with root by adding export=DISPLAY
-rwxr-xr-x | bin/adjust_dpms | 9 |
1 files changed, 5 insertions, 4 deletions
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 |