Save your Dock layout. Switch it back in a keystroke.
A macOS menu bar app that saves your current Dock (apps, folders, order) as a named preset and switches between presets with a click or a global hotkey.
- Unlimited presets – save, apply, and delete as many Dock layouts as you want.
- Global hotkeys – assign a shortcut per preset, works even while the app is in the background.
- Menu bar only – no Dock icon, no Cmd+Tab entry, stays out of your way.
- No network, no dependencies – pure Foundation/AppKit/Carbon, nothing phones home.
./Scripts/build-app.sh
cp -R dist/DockPresetSwitcher.app /Applications/Builds an ad-hoc signed .app bundle, no terminal needed to run it afterwards.
To also start it automatically at login:
./Scripts/install-login-item.shThis installs a LaunchAgent at ~/Library/LaunchAgents/de.maxsauerwein.dockpresetswitcher.plist. To remove it:
launchctl unload ~/Library/LaunchAgents/de.maxsauerwein.dockpresetswitcher.plist
rm ~/Library/LaunchAgents/de.maxsauerwein.dockpresetswitcher.plistRequires the Xcode Command Line Tools (xcode-select -p should print a path).
swift run- Set up your Dock the way you want to save it.
- Menu bar icon → "Save Current Dock as Preset…" → give it a name.
- Click a preset in the menu to apply it anytime.
- Preset submenu → "Assign Shortcut…" → press a key combo (needs at least one modifier: ⌘/⌥/⌃/⇧). The shortcut then switches the Dock globally, even while another app is in the foreground.
| Aspect | Detail |
|---|---|
| Storage | ~/Library/Application Support/DockPresetSwitcher/ |
| Presets | Presets/<name>.plist, a full export of the com.apple.dock preferences domain |
| Hotkeys | hotkeys.json, maps preset name → shortcut |
| Applying a preset | defaults import com.apple.dock <preset>.plist, then killall Dock |
| Global shortcuts | Carbon RegisterEventHotKey/InstallEventHandler, needs no Accessibility or Input Monitoring permission |
- Only ad-hoc signed (
codesign --sign -), no Developer ID certificate. Distributing to other machines would need a real certificate and notarization, or Gatekeeper will warn. - Presets only capture what
defaults export com.apple.dockreturns (Dock items, size, position, etc.), not window or Space state. - Switching presets restarts Dock.app, which causes a brief flicker. This is a macOS limitation, not something the app can avoid.
Released under the MIT License.