19 lines
423 B
Bash
Executable File
19 lines
423 B
Bash
Executable File
#!/bin/sh
|
|
|
|
export DISPLAY=:0
|
|
|
|
# no message if one is displayed already
|
|
if [[ "$(ps -efww | grep -v grep | grep gxmessage)" != "" ]]; then
|
|
exit
|
|
fi
|
|
# no message if xscreensaver active
|
|
if [ "$(ps -efww | grep -v grep | grep xscreensaver)" != "" ]; then
|
|
exit
|
|
fi
|
|
# no message if gnome-screensaver active
|
|
if [ "$(gnome-screensaver-command --query | grep is.active)" != "" ]; then
|
|
exit
|
|
fi
|
|
|
|
gxmessage 'Rest your eyes!'
|