lightsOn.sh: Don't override DISPLAY variable.

This commit is contained in:
Kolan Sh 2014-10-18 20:59:41 +04:00
parent cfab75032d
commit 4092f2d7cf
1 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ checkFullscreen()
for display in $displays for display in $displays
do do
#get id of active window and clean output #get id of active window and clean output
activ_win_id=`DISPLAY=:0.${display} xprop -root _NET_ACTIVE_WINDOW` activ_win_id=`DISPLAY=$DISPLAY.${display} xprop -root _NET_ACTIVE_WINDOW`
#activ_win_id=${activ_win_id#*# } #gives error if xprop returns extra ", 0x0" (happens on some distros) #activ_win_id=${activ_win_id#*# } #gives error if xprop returns extra ", 0x0" (happens on some distros)
activ_win_id=${activ_win_id:40:9} activ_win_id=${activ_win_id:40:9}
@ -72,7 +72,7 @@ checkFullscreen()
#fi #fi
# Check if Active Window (the foremost window) is in fullscreen state # Check if Active Window (the foremost window) is in fullscreen state
isActivWinFullscreen=`DISPLAY=:0.${display} xprop -id $activ_win_id | grep _NET_WM_STATE_FULLSCREEN` isActivWinFullscreen=`DISPLAY=$DISPLAY.${display} xprop -id $activ_win_id | grep _NET_WM_STATE_FULLSCREEN`
if [[ "$isActivWinFullscreen" = *NET_WM_STATE_FULLSCREEN* ]];then if [[ "$isActivWinFullscreen" = *NET_WM_STATE_FULLSCREEN* ]];then
isAppRunning isAppRunning
var=$? var=$?