To make using the alias-trick nicer, you'd probably want to:
- Create a script file like "update-dock-apps-folder.sh".
- Edit the script file with a text editor to give it content like:
Bash:
#!/bin/zsh
# Delete all files in your "Apps" folder
rm "/Users/yourname/Your Dock Apps Folder/"*
# Create aliases to apps in reverse order
osascript -e 'tell application "Finder" to make alias file to (POSIX file "/System/Applications/System Settings.app") at (POSIX file "/Users/yourname/Your Dock Apps Folder")'
osascript -e 'tell application "Finder" to make alias file to (POSIX file "/System/Applications/Utilities/Terminal.app") at (POSIX file "/Users/yourname/Your Dock Apps Folder")'
osascript -e 'tell application "Finder" to make alias file to (POSIX file "/Applications/Xcode.app") at (POSIX file "/Users/yourname/Your Dock Apps Folder")'
# Rename aliases to give them nicer names
mv "/Users/yourname/Your Dock Apps Folder/System Settings.app" "/Users/yourname/Your Dock Apps Folder/System Settings"
mv "/Users/yourname/Your Dock Apps Folder/Terminal.app" "/Users/yourname/Your Dock Apps Folder/Terminal"
mv "/Users/yourname/Your Dock Apps Folder/Xcode.app" "/Users/yourname/Your Dock Apps Folder/Xcode"
- To make the script file executable, open Terminal, navigate to the script file's folder, and run the following command:
Bash:
chmod +x ./update-dock-apps-folder.sh
Then, if you want to add, remove, or reorder any apps in your "Apps" folder in the Dock, you only need to add, remove, or reorder the appropriate lines in the alias-creating section of the script file (and also change the corresponding lines at the last section if you want to rename the aliases), open Terminal, navigate to the script file's folder, and execute the script by running the following command:
Bash:
./update-dock-apps-folder.sh