Last week we explained how you can use a simple Terminal command to insert spaces in your macOS Dock and visibly group together app icons. In this article, we're going to highlight another simple Terminal hack that turns the Dock into more of a straightforward app switcher by making it display only apps that are currently running on your Mac.



Seeing only active apps at the bottom of your desktop can be a refreshing change if your Dock has become cluttered with various app shortcuts over time, and you can always use Spotlight (key combination Command-Space to activate) or an alternative method to launch your Mac apps.

When following the simple steps below, just bear in mind that Terminal is a powerful app, so make sure you enter the commands properly, especially if you're not familiar with it.



How to Show Only Active Apps in Your Dock

Launch the Terminal app found in Applications/Utilities. (To quickly open the Utilities folder in Finder, select Go -> Utilities from the menu bar, or use the key shortcut Shift-Command-U.)

At the Terminal prompt, type the following command and press Enter: defaults write com.apple.dock static-only -bool true; killall Dock



Your Dock will reboot in order to show only the currently running apps on your Mac in the order they were launched.



How to Revert the Dock Back to Its Original State

If you decide you don't like this way of using the Dock, follow the steps below to return it to its usual behavior.

Launch the Terminal app again if it's not already open.

At the Terminal prompt, type the following command and press Enter: defaults write com.apple.dock static-only -bool false; killall Dock

Your Dock will reboot and revert to showing both running and non-running apps.

If there's a specific active app that you'd like to hide from the Dock for whatever reason, there are a couple of third-party utilities that might help. Dock Dodger is a free drag-and-drop tool that can hide certain apps from the Dock even when they're running (once placed on the tool's droplet, you have to restart the app in question to hide it, although our success rate varied depending on the app). If you're willing to open your wallet, GhostTile is a more recent and reliable paid-for alternative with similar functionality.