Skip to content

Instantly share code, notes, and snippets.

/gist:7913c26c8e587a4bab9e Secret
Created Oct 7, 2013

Embed
What would you like to do?
#!/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
You can’t perform that action at this time.