42 lines
2.6 KiB
Bash
Executable File
42 lines
2.6 KiB
Bash
Executable File
#!/bin/bash
|
|
LOGGED_USER=`stat -f%Su /dev/console`
|
|
sudo su $LOGGED_USER -c 'defaults delete com.apple.dock persistent-apps'
|
|
|
|
dock_item() {
|
|
printf '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>%s</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>', "$1"
|
|
}
|
|
|
|
settings=$(dock_item /System/Applications/System\ Settings.app)
|
|
launch=$(dock_item /System/Applications/Launchpad.app)
|
|
terminal=$(dock_item /System/Applications/Utilities/Terminal.app)
|
|
calendar=$(dock_item /System/Applications/Calendar.app)
|
|
reminders=$(dock_item /System/Applications/Reminders.app)
|
|
mail=$(dock_item /System/Applications/Mail.app)
|
|
rss=$(dock_item /Applications/NetNewsWire.app)
|
|
messages=$(dock_item /System/Applications/Messages.app)
|
|
discord=$(dock_item /Applications/Discord.app)
|
|
fbmessages=$(dock_item /Applications/Messenger.app)
|
|
firefox=$(dock_item /Applications/Firefox.app)
|
|
safari=$(dock_item /System/Cryptexes/App/System/Applications/Safari.app)
|
|
mullvad=$(dock_item /Applications/Mullvad\ Browser.app)
|
|
video=$(dock_item /System/Applications/QuickTime\ Player.app)
|
|
video2=$(dock_item /Applications/VLC.app)
|
|
notes=$(dock_item /System/Applications/Notes.app)
|
|
notes2=$(dock_item /Applications/Obsidian.app)
|
|
pages=$(dock_item /Applications/Pages.app)
|
|
numbers=$(dock_item /Applications/Numbers.app)
|
|
photos=$(dock_item /System/Applications/Photos.app)
|
|
pixel=$(dock_item /Applications/Pixelmator\ Pro.app)
|
|
vscode=$(dock_item /Applications/Visual\ Studio\ Code.app)
|
|
rwd=$(dock_item /Applications/ResponsivelyApp.app)
|
|
db=$(dock_item /Applications/Sequel\ Ace.app)
|
|
ftp=$(dock_item /Applications/Transmit.app)
|
|
# xcode=$(dock_item /Applications/Xcode.app)
|
|
# xcodesim=$(dock_item /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app)
|
|
vmware=$(dock_item /Applications/VMware\ Fusion.app)
|
|
textedit=$(dock_item /Applications/BBEdit.app)
|
|
|
|
# sudo su $LOGGED_USER -c "defaults write com.apple.dock persistent-apps -array '$settings' '$launch' '$terminal' '$calendar' '$reminders' '$mail' '$rss' '$messages' '$discord' '$fbmessages' '$firefox' '$safari' '$mullvad' '$video' '$video2' '$notes' '$notes2' '$pages' '$numbers' '$photos' '$pixel' '$vscode' '$rwd' '$db' '$ftp' '$xcode' '$xcodesim' '$vmware' '$textedit' "
|
|
sudo su $LOGGED_USER -c "defaults write com.apple.dock persistent-apps -array '$settings' '$launch' '$terminal' '$calendar' '$reminders' '$mail' '$rss' '$messages' '$discord' '$fbmessages' '$firefox' '$safari' '$mullvad' '$video' '$video2' '$notes' '$notes2' '$pages' '$numbers' '$photos' '$pixel' '$vscode' '$rwd' '$db' '$ftp' '$vmware' '$textedit' "
|
|
|
|
killall Dock |