Alfred 2, With Recommended Workflows

Alfred iconIf you use a Mac, you should be using Alfred. Seriously. In late 2011, at the insistence of my friend Adam, I switch to Alfred from Quicksilver. Life since has been nothing but complete bliss.

Alfred just makes using your Mac easier. A quick ⌘+Space key combination opens the Alfred interface (If, like me, you set yours to use that combination.). From there, I can find and open files, play a song in Spotify, create a shortlink, get the local weather forecast, do simple calculations, retrieve a previous copied string of text, remember a word’s spelling or definition, paste frequently used text snippets, search Evernote, or force quit any open application.

Alfred 2 is ready to serve
Alfred 2 is ready to serve

Entering a command into Alfred’s simple text area will generally start returning results after a keystroke or two. The more you type, the better the results are filtered. To operate on any of the results, simply use the up and down arrow keys and press Return, or avoid all that repetition and simply use the ⌘+[number] combination to run the result directly. Bam! Already, Alfred is working for you, and you haven’t even scratched the surface of possibility.

Simple Evernote search
Simple Evernote search

While this is useful, for sure, Alfred really shines with the use of workflows: scripts and macros that can be executed with or without the Alfred command window, and operate on system commands or with external services and APIs. Want to grab a shortlink of a Dropbox file or directory? Instead of navigating to Dropbox, clicking the paperclip and copying the link, then shortening it, simply install the Dropbox Quick Links workflow. Then, with a file or directory selected in the Dropbox directory in Finder (or its descendants), press ⌘+Shift+D to automatically create (or locate) the shortlink and copy it to the system clipboard. Voila!

Some of the features I use most:

System commands

Need to logout, sleep, or restart? Simply type the command into the Alfred window.

Alfred system commands
Alfred system commands

Need to open a file? Just press [Space] and begin searching the filename. Bam! Don’t remember what you named the file, but have an idea what’s in it? Just type “in” followed by what you remember. Voila! It’s like magic.

Alfred file search
Alfred file search

Search the Interwebs

One of the coolest basic features of Alfred is the ability to search the corners of the web without the several steps required in a web browser. Simply start typing the service/engine into Alfred (when yours comes up, pressing “Return” completes it, making it quicker to get entering your argument), followed by a query string, then press “Return.” Voila!

Alfred web search
Alfred web search

Need to search in a service that’s not included with Alfred? Simply add your own. To start, do a search at your favorite website. For this example, I chose Reddit. When the search results are served, look at the URL and find your search term. In the custom search URL in Alfred, replace this term in the url with “{query}.” Now, when you do you search in Alfred, your argument will be sent to the service. Like magic.

Custom search in Alfred 2
Custom search in Alfred 2
Configure custom search in Alfred 2
Configure custom search in Alfred 2
Alfred custom search in action
Alfred custom search in action

Workflows

Workflows in Alfred 2, like the Extensions we loved in Alfred 1.x, make it possible to extend Alfred and take our productivity to the next level. You can create your own to do whatever you want, or simply download one of the many available workflows and modify if necessary. In order to use workflows, you have to pay for a Powerpack license. I think the Powerpack is a great value. I am a “Mega Supporter,” which entitles me to lifetime upgrades, for which I paid a £20 upgrade fee from 1.x. (Because I know some of you are wondering, it’s Option+3.)

Evernote

The Evernote workflow is fantastic. It can search inside notes, search for specific titles, create new notes, paste into notes, etc. I chose to show this one first because of it’s complexity, to demonstrate the power you can harness with a few simple clicks. Somebody has already done the work to create the workflow, and all you have to do is install it (it’s a single click). You can change the keyword trigger or assign a keyboard shortcut combination if you want. You can modify the output behaviors, too. But the very most you have to do is learn a few new commands. That’s it. And if you can’t be bothered to do that, they’re usually intuitive enough that typing the first few characters into Alfred will return hints that are likely exactly what you wanted anyways. It couldn’t be any more simple.

If you’re not using Evernote, you’re likely not in my target audience. :)

Alfred Evernote workflow
Alfred Evernote workflow

Random Password

Need a random password? (You don’t just make them up, I hope.) The default Alfred command for this workflow is “password,” but I shortened mine to simply “pw.” Kailey Lampert created this simple but highly useful workflow, appropriately titled “Random Password.” ALL you have to do here is type “pw” and several passwords will be returned. ⌘+[number] will automatically copy the password you choose to the clipboard, ready for your pasting pleasure. Put in a number, and the password will be that length. Add “strong” for…you guessed it. “stronger” for, well, now it’s getting silly.

Random Password Alfred 2 workflow
Random Password Alfred 2 workflow

To change the keyword on any workflow, simply double-click on the “trigger.”

Double-click trigger to modify
Double-click trigger to modify

Then change the keyword in the, you guessed it, “keyword” field. Voila! It’s that simple.

Change workflow keyword
Change workflow keyword

Sleep Displays

A simple utility workflow that I used constantly is Sleep Displays by Josh Dick. ⌘+Shift+Eject sleeps the displays without any utility, but my Air doesn’t have an Eject button, and I simply prefer an Alfred solution when possible. I set the keyboard shortcut to ⌘+D for this, but I think I’ll remove it because it renders the same combination in Photoshop useless, which is more important to me. I also created a keyword for the workflow, so now typing “sd” into Alfred sleeps my displays. Pretty handy, eh?

Sleep Displays keyword trigger addition
Sleep Displays keyword trigger addition

Shorten URL

The Shorten URL workflow does exactly what you’d expect it to do. I prefer to use the Bitly shortener, so in this workflow’s script, I moved that to the top. I also changed the user and api key to my own, so shortened URLs would show up in my Bitly Stuff, and I could track the link usage. I can either pop open the Alfred command window and type “short” followed by the url, or simply skip Alfred altogether and use the keyboard combination ⌘+Shift+L to put a shortened Bitly link into my system clipboard. That’s cool, right?

To set up the workflow with your specific shortening services, double-click the script filter.

Alfred workflow: Script filter
Alfred workflow: Script filter

This opens up the window below.

Alfred 2 workflow script area
Alfred 2 workflow script area

In the “Script” area you’ll see the api object has a series of services with numeric keys. You can reorder these to change the order of the services in Alfred, which is beyond the scope of this post. However, what is important to do is enter your own credentials. For Bitly I edited the value of index 0 with my own information.

0 : {'api_url':'https://api-ssl.bitly.com/v3/shorten?
format=json&login=brentdanley&
apiKey=R_7eff08909kB40DKdmIQO35c0472d75d21e&
longUrl=','title':'bit.ly',
'des':'http://bit.ly/'},

Basically, just add your login name and apiKey. The “&” character delineates key value pairs in the string, so you’ll want to add your key between the “=” and “&”.

Hangman

While Alfred is solidly a productivity app, it isn’t all work and no play. Kailey Lampert’s Hangman workflow provides us with a sometimes-needed fun diversion from the rigors of coding. It takes a few minutes to get used to the way it works. As a proof of concept, this workflow really shines.

Weather

David Ferguson created this handy weather workflow for getting the current weather conditions and forecast. Once installed, type “weather” to get the action for setting the location. Then, simply type either “forecast” or “condition” into Alfred, and wait a second for the results to show up IN Alfred. Booya!

Weather Alfred 2 workflow
Weather Alfred 2 workflow

Dropbox Shortlinks

Duane created the Dropbox Shortlinks workflow. I set the keyboard combination to ⌘+Shift+D. I mentioned above what it does. Basically, any time I’m in the Dropbox directory structure in Finder, performing the combo will copy a shortened Dropbox link to the file or directory into my clipboard, ready to be pasted into an email, iMessage conversation, tweet, IM, or blog post. Bam!

I did modify this workflow. I didn’t like the large print confirmation display, so I replaced it with a normal notification. No big deal.

Dropbox Alfred 2 workflow modifications
Dropbox Alfred 2 workflow modifications

Obviously, this post isn’t exhaustive. There is so much you can do with Alfred and its workflows. Get programming or get downloading. Either way, you’ll now have all kinds of time freed up by your newfound productivity, for a small (or FREE) monetary price and the tiniest of learning curves. Have fun, and good luck.

Use Alfred already? Let me know in the comments what are your favorite features and workflows.

11 Comment

  1. Excellent write-up, Brent.

    1. Thanks, duder. For it all. :)

  2. Thx, I’ve been using Alfred a while now, but haven’t gotten into any of the workflows. This is a great intro to what I’ve been missing.

    1. Thanks, Ryan. Did you see you can write your own scripts in Python, Ruby, PHP, bash, etc? Makes me ask, “Hmmmmm… What shall I build first?”

  3. Here are a few more workflows: https://github.com/zenorocha/alfred-workflows

    I especially like the one for Dash (http://kapeli.com/dash), colors, and caniuse.

  4. I’m trying to figure out how to paste in my personal login info for bit.ly – I have not been able to figure that out (I’m not a dev, but I love Alfred)! ;-)

    Thanks!

    1. Kyle – I’m stoked you love Alfred. So do I. :)

      I’ve added some information to the URL Shortener section above to make it more clear how to integrate your own shortening service credentials into the workflow. Please let me know if you’re still having trouble.

      Cheers.

      1. Here’s my first attempt at a Bit.ly link using my new improved alfred workflow: http://bit.ly/1gFNCfY. I wonder if it helps your SEO to link to your blog from your blog comments?! ;-)

        Thanks a million!

        1. Yay! I don’t care about SEO on my blog, but it’s an interesting question.

          You’re very welcome. Glad my edit helped you out. :)

  5. Check out my updated unit converter “Units”.

    http://time.designandsuch.com/units/
    it can convert various units, length, temperature, currencies etc.

    1. Very nice. Thanks for the comment and suggestion.

Leave a Reply