-
Notifications
You must be signed in to change notification settings - Fork 2
/
install_osx.sh
executable file
·307 lines (252 loc) · 7.52 KB
/
install_osx.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
#!/bin/bash
#######################
# System dependencies #
#######################
# Use some sane macOS system defaults
# Inspired by https://mths.be/macos
echo "Setting up system preferences..."
echo
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
sudo -v
#################
# General UI/UX #
#################
# Disable transparency in the menu bar and elsewhere on Yosemite
defaults write com.apple.universalaccess reduceTransparency -bool true
# Always show scrollbars
defaults write NSGlobalDomain AppleShowScrollBars -string "WhenScrolling"
# Increase window resize speed for Cocoa applications
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
##########
# Screen #
##########
# Require password immediately after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
# Save screenshots to the desktop
defaults write com.apple.screencapture location -string "${HOME}/Desktop"
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "png"
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Finder: show path bar
defaults write com.apple.finder ShowPathbar -bool true
# Keep folders on top when sorting by name
defaults write com.apple.finder _FXSortFoldersFirst -bool true
# Avoid creating .DS_Store files on network or USB volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
# Use column view in all Finder windows by default
# Four-letter codes for the other view modes: `icnv`, `Nlsv`, `Flwv`
defaults write com.apple.finder FXPreferredViewStyle -string "clmv"
####################################
# Dock, Dashboard, and hot corners #
####################################
# Disable Dashboard
defaults write com.apple.dashboard mcx-disabled -bool true
# Don’t show Dashboard as a Space
defaults write com.apple.dock dashboard-in-overlay -bool true
# Don’t automatically rearrange Spaces based on most recent use
defaults write com.apple.dock mru-spaces -bool false
# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true
# Add a spacer to the left side of the Dock (where the applications are)
#defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'
# Add a spacer to the right side of the Dock (where the Trash is)
#defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}'
# Alternatively:
# touch FullSpace.dockspace
# touch HalfSpace.docksmallspace
###################
# Safari & WebKit #
###################
# Privacy: don’t send search queries to Apple
defaults write com.apple.Safari UniversalSearchEnabled -bool false
defaults write com.apple.Safari SuppressSearchSuggestions -bool true
# Enable “Do Not Track”
defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true
# Set Safari’s home page to `about:blank` for faster loading
defaults write com.apple.Safari HomePage -string "about:blank"
# Enable Safari’s debug menu
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
# Enable the Develop menu and the Web Inspector in Safari
defaults write com.apple.Safari IncludeDevelopMenu -bool true
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true
# Add a context menu item for showing the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
####################
# Activity Monitor #
####################
# Show the main window when launching Activity Monitor
defaults write com.apple.ActivityMonitor OpenMainWindow -bool true
# Show all processes in Activity Monitor
defaults write com.apple.ActivityMonitor ShowCategory -int 0
# Sort Activity Monitor results by CPU usage
defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage"
defaults write com.apple.ActivityMonitor SortDirection -int 0
##########
# Photos #
##########
# Prevent Photos from opening automatically when devices are plugged in
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true
############
# Homebrew #
############
# Make me some homebrew!
echo "Installing homebrew..."
echo
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Get some nice brews
brew install --with-default-names \
findutils \
gnu-sed \
gnu-which \
gnutls \
grep
brew install \
ack \
ag \
ansifilter \
ansiweather \
bash \
binutils \
colordiff \
colormake \
coreutils \
curl \
diff-so-fancy \
diffutils \
direnv \
docker-compose \
docker-machine \
erlang \
emojify \
fasd \
fd \
ffmpeg \
fortune \
gifsicle \
git \
git-extras \
git-lfs \
gnupg2 \
gnu-tar \
gpg \
go \
grc \
gzip \
heroku \
heroku-toolbelt \
htop \
hub \
imagemagick \
iina \
locateme \
mercurial \
mongodb \
mtr \
neovim \
nmap \
openssl \
parallel \
perl \
pgcli \
postgresql \
pstree \
pyenv \
pyenv-virtualenv \
ranger \
rename \
rmtrash \
tree \
watch \
wdiff \
wifi-password \
wget \
vim \
brew cask install \
aegisub \
alfred \
anki \
appcleaner \
arq \
bartender \
bettertouchtool \
beyond-compare \
brave \
charles \
cheatsheet \
chrome-devtools \
chromium \
cyberduck \
discord \
docker \
dropbox \
fantastical \
firefox \
flow \
flux \
forklift \
font-office-code-pro \
font-sourcecodepro-nerd-font-mono \
franz \
ganache \
gimp \
gitter \
google-chrome \
gpg-suite \
grandperspective \
haptic-touch-bar \
iterm2 \
karabiner-elements \
keybase \
linphone \
little-snitch \
macdown \
macs-fan-control \
mountain-duck \
namebench \
notion \
numi \
omnifocus \
onyx \
opera \
paragon-ntfs \
private-internet-access \
rescuetime \
rocket-chat \
signal \
skype \
spectacle \
steam \
telegram \
the-unarchiver \
time-out \
transmission \
vimr \
vlc \
virtualbox \
xquartz \
zoomus \
1password
# Install custom taps
brew tap dteoh/sqa
brew cask install slowquitapps
defaults write com.dteoh.SlowQuitApps delay -int 1000
# Override system vim with macvim
brew install macvim --with-override-system-vim
brew link --overwrite macvim
# Install iTerm shell integration
curl -L https://iterm2.com/misc/bash_startup.in -o $HOME/.iterm2_shell_integration.bash