Originally Posted by eureka
This command will block script until screensaver will be enabled:
lipc-wait-event com.lab126.powerd goingToScreenSaver
This command will block script until screensaver will be disabled:
lipc-wait-event com.lab126.powerd outOfScreenSaver
Here is a script (replace echo
lipc-wait-event -m com.lab126.powerd goingToScreenSaver,outOfScreenSaver | while read event wtf_num; do
if [ "x$event" = "xgoingToScreenSaver" ]; then
echo "screensaver enabled"
else if [ "x$event" = "xoutOfScreenSaver" ]; then
echo "screensaver disabled"
Thank you very much in the evening check script.
I have a problem. I do not know where to put this script. I'm noob(