I’m Chanpory, and this is my site on how to live and work better as a designer.

You should follow me on Twitter here.

For more, check out the archives.

Flextime plus GrowlDaniel Jalkut has just released the final version of FlexTime, a fantastic little Mac timer deftly suited for the (10+2)*5 procrastination hack. It still has no out-of-the-box support for Growl’s nifty notification system. Luckily, FlexTime now has robust support for AppleScript, allowing a backdoor into the Growl system.

With a little tinkering, I’ve put together an AppleScript to let FlexTime use the Growl system to gently remind you when a new activity starts, such as when to work and when to play. I call the script, FlexTimeGrowl. (Imaginative, huh?)

Here’s how to use it:

Set up

FlexTime setupAssuming you have FlexTime and Growl already installed, here’s how to set up the FlexTimeGrowl script:

  1. Download the script here:
    FlexTimeGrowl script

  2. Create activities for work and play
    Click the plus icon on the upper left corner of the window to create a new activity. Under “Activity Schedule”, a new item will appear. Create two activities: one titled “Get back to work!” with a duration of 10 minutes, and one titled “Time for play!” with a duration of 2 minutes.

  3. Set up cues to run the FlexTimeGrowl script
    Next to “At Start” choose “Run Script”. To the right of that, there’s a pulldown. Use it to choose the FlexTimeGrowl script you just downloaded.

  4. Save
    Save your routine, and press play.

All done! When an activity starts, Growl will gently notify you with an alert that pops up, stays for a couple seconds, then goes away on its on. With Growl’s “Music Video” style notifications, it looks like this (you can adjust the speed in Growl’s preferences):

Growl popup

Growl uses the filename of the routine as the alert’s heading and the name of the activity as the message. So, if your FlexTime routine is saved as “Procrastination Hack” and your work activity is titled “Get back to work!”, it will look like this:

Growl notification example

To change the titles, just rename your routine and activities.

Note: Small bug as of version 1.01: For some reason, FlexTime won’t run AppleScripts until the first activity that plays finishes. This means Growl notifications won’t start working until the end of the first activity. Once the next activity in the routine starts, notifications appear as expected.

Why use Growl’s notification system?

  1. It’s gentle
    If you’ve set up FlexTime to show a text message when an activity starts, you have click the message to make it go away. With Growl, notifications appear and disappear gently without you having to do anything.

  2. More style
    Growl allows you to customize the appearance of notifications, and comes with a few customizable styles to choose from. My favorite is the “Music Video” style shown in the example above.

Caveats

My knowledge of AppleScript is very rudimentary. The script I made is hacked together from samples on the Growl and Flextime websites. Sources:

If you see a better and cleaner way to do this, please let us know!

20 Comments

  • Red Sweater Blog – FlexTime + Growl == No Procrastination

    gravatarAug 26, 2006
    6:05 am

    [...] Chanpory Rith of LiveClever has come up with an… umm… clever way of hooking up FlexTime’s scripted cues to Growl for, as he puts it, a “gentler way to end procrastination.” [...]

  • Gabe

    gravatarAug 26, 2006
    12:12 pm

    REQUEST TO APPLESCRIPTERS– If someone could write a script the would allow me to start multiple flex time routines at the same instant, I would like that. I dont know the first thing about applescript. This is what I’m thinking…

    I want to add to the begining of the “Breaktime.flextime” example routine a 0sec Activity that would run an applescript to start the “Merlin Mann’s Procrastnation Hack.flextime” Routine at the same time. The result would more or less that I would be reminded to rest my eyes very 10min but get up and move around (go get a beer/chips) every 50min.

    I realize that I probably could have written a new program that would do this all in one routine in the time it took me to write this comment, but I think that a script that would allow one to start other flextime routines would be very useful. Just think how easy it would be to plan out your entire day with a routine creation in the morning.

    Picture this… You already have routines set up for different activities that you do on a regular basis; Yoga, Blogging, Programing, Working on what ever you do. All of these things you have found different tempos and routines that work best for you. Before you start your productive day to come, you write a quick little FlexTime Routine to plan it all out; “Blogg” for 50min, “Yoga” for 10min, “Writing” for 2 hours, etc… Each of these Activities start one of your preprogrammed routines via applescrpit. If you dont want to do yoga the next day… just change the activity time to 0 and go about your day. If you wanted to go the next step, you could use the same applescript to let iCal start the whole routine for you at a set time. Or start your routines via Quicksilver launching of the script. I have the ideas, but not the know how. Help me out. Thanks.

  • Gabe

    gravatarAug 26, 2006
    12:15 pm

    Wow, that got long. Basically, I’m looking for someone to write an applescript that would start a flex time routine. Yeah.

  • Daniel Jalkut

    gravatarAug 26, 2006
    10:17 pm

    Hi Gabe- I’m Daniel Jalkut, the author of FlexTime. The behavior you’re looking for is pretty easy, once you get a reference to the “document” objects in AppleScript. Let’s say I’ve got two FlexTime routines in my home directory (change the paths to suit your directory name):

    tell application “FlexTime” open “/Users/daniel/MyRoutine1.flextime” as posix file open “/Users/daniel/MyRoutine2.flextime” as posix file

    set running of document "MyRoutine1.flextime" to true
    set running of document "MyRoutine2.flextime" to true
    

    end

    There was a problem with the “open” command in FlexTime 1.0, so make sure you update to 1.0.1 before trying this. Hope this helps!

    Daniel

  • Daniel Jalkut

    gravatarAug 26, 2006
    10:18 pm

    The formatting is a little messed up in my comment – make sure you add a return (newline) after the ‘tell application “FlexTime”‘

  • Gabe

    gravatarAug 27, 2006
    4:42 am

    Thanks Daniel, I’ll give it a try. I’m assuming that I do this typing bit in “Script Editor”? Could I do this for each FlexTime Routine that I would like to run, then use a FlexTime Routine to start other Routines via this script? Example: I could write a routine to wait 10min then run Applescript to start “MyRoutine1.flextime”? Thanks, for your time in aswering my entry-level questions and your great program.

  • Gabe

    gravatarAug 27, 2006
    5:02 am

    Hey Daniel, What does this mean?…

    “FlexTime got an error: NSReceiverEvaluationScriptError: 4″

  • Daniel Jalkut

    gravatarAug 27, 2006
    10:21 am

    Hi Gabe – you certainly can use a scripted cue to open and start other FlexTime routines. That’s a good idea. And yes, you basically should be able to paste that into FlexTime and be off and running.

    The error you observed is a pretty common one in AppleScript, and should probably be more informative. I’m no expert but basically it means the application couldn’t find something you specified. So you’re probably seeing it, I assume, in reference to the “document ‘Whatever.flextime” reference? Make sure the spelling of the document exactly matches what you’ve opened.

    If you want to chat about this some more feel free to contact me at support at red-sweater dot com. Or visit the red-sweater forums by clicking Support on my site. Thanks for your interest!

  • Colin Curtin

    gravatarAug 28, 2006
    12:24 am

    Hi Gabe,

    Try AntiRSI – its default is to give you 20 second breaks every 10 minutes, and 8 minute breaks every hour to go do something else, like get beer and/or chips, or, you know, stretch and do pushups. Either way.

    I’ve used it at work for quite a while to fend off RSI, and with FTG I’ll be on my way to no procrastinating in no time :)

    http://tech.inhelsinki.nl/antirsi/

  • 100 Tips for Better Life « printf

    gravatarJul 31, 2007
    12:39 am

    [...] Gently End Procrastination. Need an easy way to remind you when you should be working and when you should be playing? Try using teaming up Flextime with Growl. Here’s how. [...]

  • Internet Redux — 100 Great Tips to Improve Your Life

    gravatarJul 31, 2007
    11:03 am

    [...] Gently End Procrastination. Need an easy way to remind you when you should be working and when you should be playing? Try using teaming up Flextime with Growl. Here’s how. [...]

  • 100 Tips to Improve Your Life « My Weblog

    gravatarJul 31, 2007
    9:34 pm

    [...] Gently End Procrastination. Need an easy way to remind you when you should be working and when you should be playing? Try using teaming up Flextime with Growl. Here’s how. [...]

  • 100 Great Tips to Improve Your Life « Invisible

    gravatarAug 5, 2007
    9:03 am

    [...] Gently End Procrastination. Need an easy way to remind you when you should be working and when you should be playing? Try using teaming up Flextime with Growl. Here’s how. [...]

  • 100 Tips to Improve Your Life : XianSi ’s Blog

    gravatarAug 23, 2007
    8:57 pm

    [...] Gently End Procrastination. Need an easy way to remind you when you should be working and when you should be playing? Try using teaming up Flextime with Growl. Here’s how. [...]

  • N 2 T u a n –˜ s B l o g » Blog Archive » 100 Tips to Improve Your Life

    gravatarAug 24, 2007
    5:34 am

    [...] Gently End Procrastination. Need an easy way to remind you when you should be working and when you should be playing? Try using teaming up Flextime with Growl. Here’s how. [...]

  • 100 tips to improve your life « spiritually deep dish

    gravatarSep 18, 2007
    3:57 pm

    [...] Gently End Procrastination. Need an easy way to remind you when you should be working and when you should be playing? Try using teaming up Flextime with Growl. Here’s how. [...]

  • tell a friend script

    gravatarJan 17, 2008
    11:28 pm

    Could I do this for each FlexTime Routine that I would like to run, then use a FlexTime Routine to start other Routines via this script?

  • übersetzungen

    gravatarFeb 23, 2008
    1:24 pm

    There are many useful informations in this great article…Thanks!

  • Sean

    gravatarJul 19, 2008
    6:28 pm

    WHAT ABOUT PC USERS? IS THERE ANYTHING TO SAVE US?

  • 100 Tips to Improve Your Life (w/links) // Random Dopeness

    gravatarApr 21, 2010
    1:53 pm

    [...] Gently End Procrastination. Need an easy way to remind you when you should be working and when you should be playing? Try using teaming up Flextime with Growl. Here’s how. [...]