make cron-rest-eyes work better in cygwin again
This commit is contained in:
parent
0628ba012b
commit
b4b433f3b5
@ -1,17 +1,24 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ -r /bin/cygwin1.dll ]]; then
|
||||||
|
# in cygwin
|
||||||
|
PSF='-ef'
|
||||||
|
else
|
||||||
|
PSF='-efww'
|
||||||
|
fi
|
||||||
|
|
||||||
export DISPLAY=:0
|
export DISPLAY=:0
|
||||||
|
|
||||||
# no message if one is displayed already
|
# no message if one is displayed already
|
||||||
if [[ "$(ps -efww | grep gxmessage | grep -v grep)" != "" ]]; then
|
if [[ "$(ps $PSF | grep gxmessage | grep -v grep)" != "" ]]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
# no message if xscreensaver active
|
# no message if xscreensaver active
|
||||||
if [ "$(ps -efww | grep xscreensaver | grep -v grep)" != "" ]; then
|
if [ "$(ps $PSF | grep xscreensaver | grep -v grep)" != "" ]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
# no message if gnome-screensaver active
|
# no message if gnome-screensaver active
|
||||||
if [ "$(gnome-screensaver-command --query | grep is.active)" != "" ]; then
|
if [ "$(gnome-screensaver-command --query 2>/dev/null | grep is.active)" != "" ]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
2
windows/cron-rest-eyes.bat
Executable file
2
windows/cron-rest-eyes.bat
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
@PATH C:\cygwin\bin;C:\cygwin\usr\local\bin;%PATH%
|
||||||
|
@bash /home/josh.holtrop/prog/files/cron-rest-eyes
|
Loading…
x
Reference in New Issue
Block a user