Created
September 27, 2025 02:15
-
-
Save mculp/aa70837d01dc944f70057df0dce60bc1 to your computer and use it in GitHub Desktop.
Programmatically set the apps in your Dock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # every time I set up a MacBook, I have to remove like 50 apps from the dock. | |
| # this script is now part of my laptop setup script. | |
| # Run this first, just so you have your existing dock output if you need to revert | |
| defaults read com.apple.dock persistent-apps | |
| # Careful - this deletes all apps from your dock | |
| defaults delete com.apple.dock persistent-apps | |
| # Basically, the only thing that changes between each line is the file:/// location | |
| defaults write com.apple.dock persistent-apps -array \ | |
| '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>file:///Applications/Google%20Chrome.app/</string><key>_CFURLStringType</key><integer>15</integer></dict></dict></dict>' \ | |
| '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>file:///System/Applications/Calendar.app/</string><key>_CFURLStringType</key><integer>15</integer></dict></dict></dict>' \ | |
| '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>file:///System/Applications/App%20Store.app/</string><key>_CFURLStringType</key><integer>15</integer></dict></dict></dict>' \ | |
| '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>file:///System/Applications/System%20Settings.app/</string><key>_CFURLStringType</key><integer>15</integer></dict></dict></dict>' \ | |
| '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>file:///Applications/Discord.app/</string><key>_CFURLStringType</key><integer>15</integer></dict></dict></dict>' \ | |
| '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>file:///Applications/Warp.app/</string><key>_CFURLStringType</key><integer>15</integer></dict></dict></dict>' \ | |
| '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>file:///Applications/Raycast.app/</string><key>_CFURLStringType</key><integer>15</integer></dict></dict></dict>' | |
| killall Dock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment