Better way to switch between apps on macOS
Does this look familiar? This happens to me all the time…
I’m in the middle of a productive day and I need to run a few commands in my terminal. To do so I need to focus the iTerm app, which is already running.
So I press
⌘-tab and get this giant list of apps. I need to find iTerm there and press
tab 4 more times to get to it. The list is sorted by the most recently accessed apps, so every time I switch apps the list changes.
iTerm2 has this feature where it can be shown or hidden using a system-wide hotkey (like in the good old Quake days). But none of the other apps I use don’t support this.
Wouldn’t it be great if each app had a shortcut that would activate it?
Enter Alfred Workflows. Here’s how I set it up (text version below):
- Open Alfred settings → Workflows tab
- Add (+) → Blank Workflow
- Right click on the workflow area → Triggers → Hotkey
- Record the hotkey. Make sure the “Trigger Behaviour” is set to “Pass through modifier keys” (this removes about 500ms latency). Press Save.
- Right click on the workflow area → Actions → Launch App / Files
- Drag & Drop the app you want into the list. Press Save.
- Connect the trigger and the action.
I choose to use
⌥ (option) key combined with a single letter for my shortcuts. The keyboard has two
⌥ keys, they are easy to reach and I don’t use the typography features which the
⌥ key is bound to on macOS.
This new approach definitely has a learning curve. I kept falling back to using
⌘-tab many times. I couldn’t find a way to temporarily disable
⌘-tab, but I found a way to hide a few apps from it.
But the benefit of switching apps this way is huge. When I need a terminal, I just press
⌥\. It doesn’t matter if the corresponding app is already running or not, Alfred will launch it if needed.
Geek's guide to making decent slides
Show OSX notification when long running command finishes and your terminal is not in focus
My favorite shell shortcut
Hello! This text lives here to convince you to subscribe. If you are reading this, consider clicking that subscribe button for more details.
I write about programming, software design and side projects Subscribe