kelan.io

Cmd-Fast App Switching

One of my favorite Mac tricks is to have system-wide hot-key shortcuts for my most-used apps. Specifically, I use cmd-[opt-]Fkey. This is useful for easily launching these apps, but more importantly for quickly switching between running apps. I actually use this more than cmd-tab for app-switching, because I don’t have to:

Instead, I just do a single press of cmd-F1, and Bam!, I’m in TextMate (for example).

Implementation

I used to use Quicksilver’s Triggers to do make this magic happen. But, my recent switch back to the totally rockin’ LaunchBar 5 (which unfortunately doesn’t have the a trigger-like feature), sent me on a search for a new way to do this.

I tried Keyboard Meastro, but it seemed too powerful for this simple use-case. And, frankly, the slightly-dated look of the UI rubbed me the wrong way. I was briefly tempted to try QuicKeys, (especially because they are using my YRKSpinningProgressIndicator) but, again, it seemed like overkill.

Then I realized I already had the solution staring right at me from my very own menubar: FastScritps! Gus Mueller actually briefly mentions this usage at the end of his recent post (which is what prompted me to finish writing this) about how he cleverly uses FastScripts to replace Spaces. But I figured I could expand upon the details.

Set Up

To get FastScripts up and running with it’s new responsibilities, I first made a folder called “Launcher” in ~/Library/Scripts/ (see screenshot below), and put aliases in there to all the apps to which I wanted easy access. Then, I assigned the shortcuts by simply holding down the cmd key while selecting the app in the FastScripts menu. That’s it! It was quick and easy to set up.

Now, when you to switch to an app, just press its shortcut. If it’s not running, it will launch. If it is running you quickly switch to it. No pausing or calculating required!

My Shortcuts

Here is a screenshot of my FastScripts menu, showing the list of shortcuts that I use. This is also, not coincidentally, the list of my most-used apps.

I also use cmd-shift-Fkey to get another set of key combos to use for frequently-used documents (but took them out for this screenshot).

Note that I had to disable the standard shortcut for cmd-esc (“Hide and show Front Row”) in System Preferences > Keyboard & Mouse > Keyboard Shortcuts in order to use that for Finder. I’m not sure if I would recommend overriding cmd-esc like this, because now every time I want to go to the Finder on someone else’s computer I accidentally launch Front Row. But it does allow for a convenient extra key combo (and I never use Front Row).

A Few Issues

As quick and easy as FastScripts was to set up, I did run across a few minor issues. Firstly, FastScripts did not like it when I tried to put an alias to a document in an encrypted disk image in my “Launcher” folder. It would show the Spinner-Of-Death and ask for the dmg password every time I open the FastScripts menu. It would be nice if it didn’t try to follow that alias until I tried to access it (either by selecting it in the menu, or using the shortcut). But it’s not a deal-breaker.

Also, FastScripts doesn’t let me assign a shortcut to a folder. This prevents me from making a shortcut to any document that is actually a bundle, such as a Numbers document, or an Xcode project. Again, this would be nice, but I can deal with this limitation.

Parting thoughts

I was already using the free FastScript Lite for two scripts: John Gruber’s Copy Mail Message URL and Daniel Jalkut’s own Finder icon nudging (for laying out disk images). Once I started using FastScripts for this new task I promptly upgraded to the full version, in order to support Daniel and his great app. It’s simple, light-weight, inexpensive, and useful for all my other script-launching needs as well. Plus, it’s made by a really great indie developer. What’s not to like?

The good news is that, as of version 2.4, there is just a single version of FastScripts. It has all the features and is free for up to 10 shortcuts. So there is no excuse not to download it and try out this handy trick.

Finally, I really want everybody to use and love this trick for quickly switching apps. Once you get used it, it’s amazingly great. However, I think it needs a catchy name in order for it to really take off. Anybody have any good ideas?