-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.sh
140 lines (97 loc) · 3.66 KB
/
setup.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#!/bin/sh
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Colors
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
BLUE=$(tput setaf 4)
RESET=$(tput sgr0)
read -p "Press ${BLUE}any${RESET} key to start the install process: "
echo "${BLUE}Staring install process...${RESET}"
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# System Changes
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo "${RED}Disabling${RESET} GateKeeper"
sudo spctl --master-disable
sudo defaults write /Library/Preferences/com.apple.security GKAutoRearm -bool NO
echo "${RED}Disabling${RESET} dashboard"
defaults write com.apple.dashboard mcx-disabled -boolean YES; killall Dock
echo "${GREEN}Adding${RESET} blank space to dock"
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'
echo "${BLUE}Setting${RESET} key repeat and key delay to be faster (${RED}reboot required${RESET})"
defaults write -g InitialKeyRepeat -int 15
defaults write -g KeyRepeat -int 2
echo "${BLUE}Configuring${RESET} dock to autohide"
osascript <<EOD
tell application "System Events"
if (get autohide of dock preferences) is false then
tell dock preferences to set autohide to not autohide
end if
end tell
EOD
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Development Tools
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo "${GREEN}Installing${RESET} Xcode Command Line tools"
xcode-select --install
read -p "Press ${BLUE}any${RESET} key once the Xcode Command Line tools are done installing..."
echo "${GREEN}Installing${RESET} Homebrew"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "${BLUE}Setting${RESET} Safari Development Menu"
defaults write com.apple.Safari IncludeDevelopMenu -bool true
echo "${BLUE}Setting${RESET} Full Path To Show in Finder"
defaults write com.apple.finder ShowPathbar -bool true
brew_packages=(
"git"
"node"
"mas"
"python3"
"fish"
)
echo "${GREEN}Installing${RESET} Homebrew packages"
for package in "${brew_packages[@]}"; do
brew install "$package"
done
brew_cask_applications=(
"sublime-text"
"1password"
"iina"
"cheatsheet"
"backblaze"
"istat-menus"
"bartender"
"sketch"
"docker"
)
echo "${BLUE}Setting${RESET} Fish 🐠 to be the shell"
echo /usr/local/bin/fish | sudo tee -a /etc/shells
chsh -s /usr/local/bin/fish
echo "${GREEN}Installing${RESET} Homebrew Cask Applications"
for cask_package in "${brew_cask_applications[@]}"; do
brew cask install "$cask_package"
done
mas_applications=(
"924726344" # Delieveries
"497799835" #Xcode
"409201541" #Pages
"409203825" #Numbers
"409183694" #Keynote
)
for mas_app in "${mas_applications[@]}"; do
mas install "$mas_app"
done
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Dotfiles
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
read -p "Press ${BLUE}any${RESET} key once you've setup iCloud Documents..."
cd /Users/john/Documents/Programming/Personal/dotfiles/terminal
open Personal.terminal
defaults write com.apple.Terminal "Default Window Settings" -string 'Personal'
defaults write com.apple.Terminal "Startup Window Settings" -string 'Personal'
cd ~
rm ~/.zshrc
ln -s /Users/john/Documents/Programming/Personal/dotfiles/zsh/.zshrc ~/.zshrc
ln -s /Users/john/Documents/Programming/Personal/dotfiles/git/gitconfig ~/.gitconfig
ln -s /Users/john/Documents/Programming/Personal/dotfiles/git/gitignore_global ~/.gitignore_global
ln -s ~/Documents/Programming/Personal/dotfiles/sublime/User ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime