aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/adjust_dpms9
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