From 742ce01ecdf7a3d1bc30cc1aee0cad345f119fce Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 25 Feb 2014 23:41:47 +0100 Subject: Correcting DISPLAY export and if clause for grabbing former screensaver/dpms values --- bin/adjust_dpms | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/adjust_dpms b/bin/adjust_dpms index a54e539..0391dba 100755 --- a/bin/adjust_dpms +++ b/bin/adjust_dpms @@ -5,7 +5,7 @@ # Run as timed user script (i.e. adjust_dpms@.service) with systemd # from /etc/systemd/system/timer-minutely.target.wants -export DISPLAY=:0 +export DISPLAY=:0.0 config="/home/$(whoami)/.config/dpms" blankoff=0 @@ -52,7 +52,7 @@ if [ $blankoff -gt 0 ]; then else xsetq=$(xset q|grep timeout|awk '{print $2}') # if the timeout is still 0, set it to its former value, or just switch on screensaver/dpms again - if [ $xsetq -eq 0 ];then + if [[ $xsetq -eq 0 ]];then if [[ -f "$adjust_dpms" ]];then xset $(head -n1 $adjust_dpms) xset $(tail -n1 $adjust_dpms) -- cgit v1.2.3-70-g09d2