Tag: alfred

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.

PopClip + Dash = Xcode Love

I’ve written about PopClip and the Dash documentation browser, in particular how I found an issue using the PopClip Dash extension and provided a fix.

Here’s why I love the combination of PopClip with its myriad extensions and Dash while using Xcode. My standard development application launch comprises:

On my iMac, I additionally launch Kaleidoscope for file comparisons.

I always have PopClip running in the background, with the Dash Extension installed. When I select text in Xcode, the familiar PopClip menu comes up and includes the “cat” icon for Dash. Selecting that Dash icon switches over to Dash and looks up the selected text. I find Dash a whole lot more useful, easier to navigate, and quicker compared to Xcode’s Organiser.

The usefulness of Dash comes from clicking on the method declaration (it has a grey background) which copies the entire method text. Switching back to Xcode via command-tab, I do a paste and voilà, I have the method declaration in place. You could also select and copy portions of the text in Dash, if you so desire.

The best part is you’re not restricted to only the documentation which Apple provides. You can populate Dash with a whole slew of documentation, including PHP, Ruby, Python, and even man pages! And you don’t have to be tied in to Xcode – go on, be different and use BBEdit, TextWrangler, or TextMate!

As for PopClip, it’s a pity that I can only have 22 PopClip extensions… Fortunately I don’t need that many!

One more thing… I don’t use the dock to launch applications – I use Alfred instead. The dock only contains currently running applications (thanks Elaine and MacBites!). The nice thing about the Alfred Powerpack (extra cost, not much but worth it!) is that it can launch a set of applications when a short string is typed in its search field. I open Alfred (control-space in my case) and type in dev, press return and my standard suite of development applications launches.

Share and Enjoy!