Show only open apps in the Dock on Mac
By default, the macOS Dock is a permanent row of shortcuts — apps you have pinned whether they're running or not. One hidden setting flips it into a live task switcher: only apps that are actually open appear. The Dock shrinks when nothing's running and grows as you launch things. It's a cleaner, less cluttered way to work.
What this setting does
The static-only preference key tells the Dock to ignore your pinned app shortcuts and show only the running-app indicators. The persistent icons in the left portion of the Dock disappear; the right-hand section (Downloads folder, Trash) stays. The Dock feels minimal when you start the day and fills in as you actually use your machine.
This suits anyone who launches apps from Spotlight (⌘ Space) or Alfred and finds the permanent Dock row more visual noise than useful shortcut.
The Terminal command
macOS 13 Ventura, 14 Sonoma, and 15 Sequoia expose no System Settings toggle for this. It's Terminal only.
Open Terminal (Applications → Utilities) and run:
# hide static Dock icons — show only running apps
defaults write com.apple.dock static-only -bool true && killall Dock
The Dock restarts in about a second. Your pinned icons vanish, leaving only what's open right now.
How to undo it
Set the key back to false and restart the Dock:
# restore normal Dock with pinned app icons
defaults write com.apple.dock static-only -bool false && killall Dock
Your previously pinned apps return exactly as they were — macOS keeps the list even while this preference is active.
Mainspring turns this exact setting — and 90+ others macOS buries in Terminal — into a single labelled toggle. Flip Show only open apps in Dock on, and flip it back just as fast. No commands to memorize, nothing permanent.
Try Mainspring free →Signed & notarized by Apple · 1-day free trial · $29 once
What happens to your pinned apps
Nothing is deleted. The Dock's internal list of pinned apps is still there — it's just not displayed while static-only is true. If you turn the setting off again, everything comes back in the same order.
There is one edge case: if you right-click a running app and choose "Keep in Dock" while static-only is active, that pin is written to the list silently. You'll see it reappear when you disable the mode.
Works with Stage Manager too
Stage Manager (macOS 13+) hides the Dock by default while it's active, so the two features play well together. If you use Stage Manager only sometimes, static-only makes the Dock feel more purposeful when Stage Manager is off — it reflects exactly what's running, mirroring the Stage Manager paradigm.
Frequently asked questions
Does it affect the right side of the Dock?
No. The separator, Downloads stack, and Trash icon on the right side are unaffected. Only the app-shortcut section on the left changes.
Will this setting survive a macOS update?
Generally yes. defaults values are stored in your user preferences and are not wiped by macOS point releases. Major version upgrades (e.g. 14 → 15) may occasionally reset certain preferences, but this one is typically preserved.
Can I set this for a different user account?
The defaults write command writes to the currently logged-in user's preferences. Log in as the other user and run the command there, or use defaults write -host hostname for host-level overrides (rarely needed).