The random musings of a software developer

Alfred 2 is in the Mac

I just upgraded to Alfred 2 from the previous version. Seriously – get the Powerpack, you will not be disappointed. I’ve got Alfred 1.x and wrote a couple of nifty things with their extensions, such as mounting a remote Airport Extreme drive, launching various apps, and . While the support site is a little bare right now, their support forum is a hive of buzzing activity.

I’ve ported a number of the previous extension doo-dads I had cadged up using Alfred 2’s workflows. For instance I have a keyword shortcut which launches all my development tools (wrote that up in a previous post). Alfred 2 has a workflow specifically for that called “Launch file group from keyword” (Click on the + button at the bottom of the workflow list, it’s in Templates > Files and Apps. Drag and drop the apps I want to launch and that’s it. Would be nice if there was a + in the app / file list so I can search and select them, but no matter.

The one which was a little tricky was launching an Automator workflow. Turns out that doing a “Launch file group from keyword” did not work – it simply opened the Automator workflow in Automator itself. Figured I needed to run some command line script launcher (note: osascript does not work). So I consulted the man pages using the apropos command, apropos automator in to be exact and up popped the command I needed and it was (drumroll) automator.

Back to Alfred 2, create a “Keyword to Script” workflow, located in Templates > Essentials. Next, make sure that /bin/bash is the language, uncheck all the Escaping checkboxes, and enter

automator "full_path_to_automator_workflow.workflow"

in the Script text field. You want the full path starting at the root, i.e.:

/Users/my_user_id/directory/.../directory/automator_workflow.workflow

And that’s just it!

I like the way in which Alfred 2 uses its workflows to achieve everything in Alfred 1.x’s extensions, and more, in a uniform representation. And it’s far more versatile, almost icon based programming. You can even pop up Notification Centre alerts!

Do read Federico Viticci’s review on MacStories – it’s good. In fact, read anything Federico writes.

Powered by WordPress