aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorDavid Runge <david.runge@frqrec.com>2014-02-20 12:34:11 +0100
committerDavid Runge <david.runge@frqrec.com>2014-02-20 12:34:11 +0100
commitebc627939ca72e6140a7011b06bcbed0715982dc (patch)
tree9a66d21e87293beedfa38bb39c5e7dd0c1a47fb9 /bin
parent3810996a5bc8967971deb6d05aa070d71cb3b94e (diff)
downloaddotfiles-ebc627939ca72e6140a7011b06bcbed0715982dc.tar.gz
dotfiles-ebc627939ca72e6140a7011b06bcbed0715982dc.tar.bz2
dotfiles-ebc627939ca72e6140a7011b06bcbed0715982dc.tar.xz
dotfiles-ebc627939ca72e6140a7011b06bcbed0715982dc.zip
Switch screensaver back on only once. Fixed variable error
Diffstat (limited to 'bin')
-rwxr-xr-xbin/adjust_dpms11
1 files changed, 8 insertions, 3 deletions
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