Advertisement
Guest User

Untitled

a guest
Aug 8th, 2013
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.67 KB | None | 0 0
  1. #!/bin/bash
  2. # flash-check 1.0.1
  3. # Author: Mike Vaughn <mike.vaughn.83@gmail.com>
  4. # License: GPL3
  5.  
  6. # command used to simulate user activity, kept as a variable for desktop
  7. # portability, as this command only works in KDE
  8. # TODO create GNOME equivalent
  9. NUDGE='qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity'
  10.  
  11. # amount of time to sleep each time after checking for Flash. adjust to 1 min.
  12. # less than the timeout of your screen saver.
  13. # TODO determine screen saver timeout and set this variable accordingly
  14. TIME=4m
  15.  
  16. while true; do
  17.     sleep $TIME
  18.     ps aux | grep libflashplayer.so | grep -v grep
  19.     if [ $? = 0 ]; then
  20.         $NUDGE
  21.     fi
  22. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement