An AppleScript that forces you to go to bed
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.markdown
go_to_bed.applescript

README.markdown

Go To Bed

This is an AppleScript I wrote to force me to go bed at a reasonable hour. If it's after my BedTime and before my WakeUpTime and one of my ForbiddenApps (web browser, news reader, etc) is in the foreground, Go To Bed will check with me to make sure I'm doing something worthwhile. If I'm not, it will tell me to go to bed.

Installation

Clone the repo $ git clone git://github.com/davidbalbert/go-to-bed.git open your crontab $ crontab -e paste this into your editor and save your crontab */10 * * * * osascript /path/to/go_to_bed.applescript >& /dev/null the >& /dev/null keeps cron from emailing you the output.

Configuration

You can add or remove applications from ForbiddenApps. If your foreground application is not in ForbiddenApps, Go To Bed won't bother you when it runs.

You can change BedTime and WakeUpTime to set the time range when you should go to bed. They are measured in seconds from 12:00am.

Who are you?

I'm Dave.