-
Notifications
You must be signed in to change notification settings - Fork 1
/
arrange-dock.sh
executable file
·39 lines (30 loc) · 1.53 KB
/
arrange-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
#!/usr/bin/env bash
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `osx.sh` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# Install if we don't have it
if test ! "$(brew -v)"; then
echo "Installing homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
fi
if test ! "$(dockutil --version)"; then
echo "Install latest version from https://github.com/kcrawford/dockutil/releases"
open "https://github.com/kcrawford/dockutil/releases"
fi
# Wipe all (default) app icons from the Dock
# This is only really useful when setting up a new Mac, or if you don’t use
# the Dock to launch apps.
defaults write com.apple.dock persistent-apps -array
dockutil --add /Applications/Safari.app --no-restart --position 2
dockutil --add /Applications/Calendar.app --no-restart --position 3
dockutil --add /Applications/Telegram.app --no-restart --position 4
dockutil --add /Applications/WhatsApp.app --no-restart --position 5
dockutil --add /Applications/Dash.app --no-restart --position 6
dockutil --add /Applications/calibre.app --no-restart --position 7
dockutil --add /Applications/Slack.app --no-restart --position 8
dockutil --add /Applications/Mail.app --no-restart --position 9
dockutil --add '/Applications/Visual Studio Code.app' --no-restart --position 10
dockutil --add /Applications/Alacritty.app --no-restart --position 11
dockutil --add "${HOME}/code" --no-restart --position 1
killall Dock