View Single Post
Old 11-22-2012, 07:40 AM   #162
khseal
Enthusiast
khseal actually enjoys Vogon poetry.khseal actually enjoys Vogon poetry.khseal actually enjoys Vogon poetry.khseal actually enjoys Vogon poetry.khseal actually enjoys Vogon poetry.khseal actually enjoys Vogon poetry.khseal actually enjoys Vogon poetry.khseal actually enjoys Vogon poetry.khseal actually enjoys Vogon poetry.khseal actually enjoys Vogon poetry.khseal actually enjoys Vogon poetry.
 
Posts: 35
Karma: 56654
Join Date: Oct 2012
Location: Russia
Device: Kindle Touch
Quote:
Originally Posted by eureka View Post
This command will block script until screensaver will be enabled:
Code:
lipc-wait-event com.lab126.powerd goingToScreenSaver
This command will block script until screensaver will be disabled:
Code:
lipc-wait-event com.lab126.powerd outOfScreenSaver
Here is a script (replace echo with modprobe/rmmod):
Code:
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"
  fi; fi
done
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(

Last edited by khseal; 11-22-2012 at 02:05 PM.
khseal is offline   Reply With Quote