in applescript

Minimize distractions with Keyboard Maestro

After Ryan Irelan posted about using Keyboard Maestro to block apps, I decided I could adapt the tip for a less cold-turkey approach to computer-enforced self control.

So I’ve been using Ryan’s tip with one minor change: it uses the world’s simplest AppleScript to introduce a time limit for how long distracting apps can remain open (or active). Just create a Keyboard Maestro macro like the following (or download this example):

Hide Twitter

As you can see, this macro waits one minute (60 seconds) before hiding my Twitter client. Works like a charm: hiding the app doesn’t force me to leave Twitter; but reactivating the app becomes a conscious act of will that forces me to answer That Question.

(I use a similar macro to quit my RSS reader after a more generous 10 minutes.)

For those with something to say:


  1. Michael — love it! I’ve been using David Seah’s Emergent Task Timer to track my time, so a quick OmniFocus popup every 15 minutes would help me keep my ETT updated. I’m not sure I want to be in OmniFocus that much, though, as the day’s big rocks go straight to the ETT.

  2. Hey Jonathan, sorry about the delay! Sounds like you’ve got everything sorted out though?