-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-dock.sh
53 lines (46 loc) · 1.71 KB
/
setup-dock.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash
set -euo pipefail
dockutil --no-restart --remove all
# Array of application paths
applications=(
"/System/Applications/Music.app"
"/Applications/Obsidian.app"
"/Applications/Discord.app"
"/System/Applications/Messages.app"
"/Applications/Slack.app"
"/Applications/Things3.app"
"/Applications/ResponsivelyApp.app"
"/Applications/Safari Technology Preview.app"
"/Applications/Microsoft Edge.app"
"/Applications/Firefox Developer Edition.app"
#"/Applications/Safari.app"
"/Applications/Sublime Merge.app"
"/Applications/Sublime Text.app"
"$HOME/Applications/WebStorm.app"
"$HOME/Applications/RubyMine.app"
"$HOME/Applications/PyCharm Professional Edition.app"
"$HOME/Applications/DataGrip.app"
"$HOME/Applications/RustRover.app"
"/Applications/Visual Studio Code.app"
"/Applications/Figma.app"
"/Applications/iTerm.app"
"/Applications/Transmit.app"
# "/Applications/Proxyman.app"
"/Applications/keymapp.app"
"/System/Applications/System Settings.app"
)
# Loop through the array and apply dockutil
for app_path in "${applications[@]}"; do
if [[ -e "$app_path" ]]; then
dockutil --no-restart --add "$app_path"
else
echo "Application not found: $app_path"
fi
done
# Folders
FOLDER_OPTS="--view=grid --display=folder --sort=name"
dockutil --no-restart --add ~/Downloads --replacing=Downloads --label=Downloads $FOLDER_OPTS
dockutil --no-restart --add /Applications --replacing=Applications --label=Applications --before=Downloads $FOLDER_OPTS
dockutil --no-restart --add ~/Pictures/screenshots --replacing=Screenshots --label=Screenshots --before=Downloads $FOLDER_OPTS
# Restart dock
killall Dock