Created
May 15, 2014 21:12
-
-
Save andyman/201910f839a3060165a1 to your computer and use it in GitHub Desktop.
Kills Mail.app on Mac OS X for a minute, every 5 seconds. Schedule this as a cron job to run every minute during your focus hours. You'll open up Mail, and it will quickly close it for you.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# how many seconds to sleep for between quits | |
SLEEPTIME=5 | |
for((i=0;i<60;i+=SLEEPTIME)) | |
do | |
osascript -e 'tell application "Mail" to quit' > /dev/null 2>&1 | |
sleep $SLEEPTIME | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment