#!/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 "tile-datafile-data_CFURLString$dockItem_CFURLStringType0" done