34 lines
1.2 KiB
Bash
34 lines
1.2 KiB
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
# sm @ DeZIM-Institut
|
||
|
|
|
||
|
|
# Clear existing persistent apps in the Dock
|
||
|
|
defaults write com.apple.dock persistent-apps -array
|
||
|
|
|
||
|
|
# Define an array of applications to add to the Dock
|
||
|
|
dock_apps=(
|
||
|
|
"/System/Library/CoreServices/Finder.app"
|
||
|
|
"/System/Applications/Launchpad.app"
|
||
|
|
"/Applications/Safari.app"
|
||
|
|
"Applications/Firefox.app"
|
||
|
|
"/Applications/Google Chrome.app"
|
||
|
|
"/Applications/Microsoft Outlook.app"
|
||
|
|
"/Applications/Slack.app"
|
||
|
|
"/Applications/Notes.app"
|
||
|
|
"/Applications/Microsoft Word.app"
|
||
|
|
"/Applications/Microsoft PowerPoint.app"
|
||
|
|
"/Applications/Microsoft Excel.app"
|
||
|
|
"/Applications/1Password.app"
|
||
|
|
"/Applications/Zoom.app"
|
||
|
|
"/Applications/TeamViewer.app"
|
||
|
|
"/Applications/Visual Studio Code.app"
|
||
|
|
"/Applications/iTerm.app"
|
||
|
|
"/System/Applications/System Settings.app"
|
||
|
|
)
|
||
|
|
|
||
|
|
echo "Setting the new macOS Dock layout..."
|
||
|
|
|
||
|
|
# Loop through the applications and add them to the Dock
|
||
|
|
for dockItem in "${dock_apps[@]}"; do
|
||
|
|
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>$dockItem</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>"
|
||
|
|
done
|