schussman.com logo

Using Alfred to manage tasks

Recent updates to Alfred (my earlier post here) have greatly enhanced its capabilities to run local scripts and extensions. I’ve long used the Journal Tasks TextMate bundle in conjunction with geektool to manage and display a small to-do list in one corner of my OS X desktop, and now with Alfred I can instantly add items to that list. Quite slick.

Here’s the task list viewed in TextMate: Simple and no frills.

quick list textmate

And geektool displays it on the desktop using a bit of awk:

awk '!/@done/' ~/DropBox/SimpleText/Quick\ List.taskpaper

quick list desktop

I’ve set up an Alfred extension to add to the list using the “do” command:

alfred quicklist

The command in Alfred looks like this:

perl -p -i -e 's/^Quick List:\n/Quick List:\n\n- {query}/' ~/Dropbox/SimpleText/Quick\ List.taskpaper; growlnotify -m "Added item to quicklist"

It finds the header for the appropriate part of the list, and inserts the query passed to it at the top of the list. (Update paths as appropriate; I keep my quick list file in my DropBox folder.)

Growl provides a nice visual confirmation that the item has been added. I still have to open the file in TextMate to mark items as @done and periodically expunge completed items, but it’s great to be able to effortlessly add to the list.

The entire Alfred extension is at github.