Skip to content

Instantly share code, notes, and snippets.

Created October 7, 2013 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/7913c26c8e587a4bab9e to your computer and use it in GitHub Desktop.
Save anonymous/7913c26c8e587a4bab9e to your computer and use it in GitHub Desktop.
#!/bin/bash
cd $GAMEDIR
while true; do
EDITED=$(find -mmin -30 -type f | wc -l)
if [ "$EDITED" = 0 ]; then
notify-send "It's been 30 minutes, and you haven't done anything. You've lost your surfing privileges, buddy."
pkill chrome
else
EDITED=$(find -mmin -10 -type f | wc -l)
if [ "$EDITED" = 0 ]; then
notify-send "No files updated for 10 minutes, if you keep at it - you'll lose your surfing privileges."
fi
fi
sleep 60
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment