-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproSetup.sh
327 lines (254 loc) · 8.9 KB
/
proSetup.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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
#!/bin/sh
echo "I ❤️ 🍎"
echo "@FLD ProSetup"
echo "by @FLD"
echo "https://francis-lamontagne.com"
#-----------
#Based on
# nnj (https://github.com/nnja/new-computer/blob/master/setup.sh)
# ruyadorno (https://github.com/ruyadorno/installme-osx/)
# millermedeiros (https://gist.github.com/millermedeiros/6615994)
# brandonb927 (https://gist.github.com/brandonb927/3195465/)
#-----------
# Set the colours you can use
black=$(tput setaf 0)
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
blue=$(tput setaf 4)
magenta=$(tput setaf 5)
cyan=$(tput setaf 6)
white=$(tput setaf 7)
# Resets colors
#reset=`tput sgr0`
#run alert
echo "###############################################" $red
echo "Are you sure you want to run this script?" $magenta
echo "understood that it will make changes to your computer? (y/n)" $red
read -r response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
CONTINUE=true
fi
if ! $CONTINUE; then
# Check if we're continuing and output a message if not
echo "Please go read the script, it only takes a few minutes" $red
exit
fi
sudo -v
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
echo "###############################################" $red
#install Brew
echo "###############################################" $red
echo "Install Homebrew"
if test ! $(which brew)
then
## Don't prompt for confirmation when installing homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null
fi
#manage brew
brew upgrade
brew update
brew tap caskroom/cask
echo "###############################################" $red
#Cask
echo "###############################################" $red
echo "Brew cask"
#dev + env
brew install git
brew install zsh
brew install python3
brew install nvm
brew install node
brew install yarn
brew install pnpm
brew install rename
brew install iterm2
brew install docker
brew install visual-studio-code
brew install sublime-text
brew install rstudio
brew install processing
brew install anaconda
brew install runjs
brew install cakebrew
brew install sourcetree
brew install github
brew install mysqlworkbench
brew install notion
brew install slack
brew install discord
brew cask install google-chrome
brew install firefox
brew install microsoft-edge
brew install qgis
brew install spotify
brew install xcodes
brew install betterdisplay
brew install colour-contrast-analyser
brew install blender
brew install figma
brew install adobe-creative-cloud
#geo
brew install gdal
brew install geos
brew install spatialindex
#manual
#mozillaDev
#DisplayLinkManager
#adobe
#photoshop
#Illustrator
#Dimension
#indesign
#AE
#Acrobat
#clean old version
brew cleanup
echo "###############################################" $red
#Install from appstore
echo "###############################################" $red
echo "Install apps from app store"
# ### find app ids with: mas search "app name"
# brew install mas
# ### Mas login is currently broken on mojave. See:
# ### Login manually for now.
# echo "Need to log in to App Store manually to install apps with mas...." $red
# echo "Opening App Store. Please login."
# open "/Applications/App Store.app"
# echo "Is app store login complete.(y/n)? "
# read response
# if [ "$response" != "${response#[Yy]}" ]
# then
# mas install 907364780 # Tomato One - Pomodoro timer
# mas install 485812721 # Tweetdeck
# mas install 668208984 # GIPHY Capture. The GIF Maker (For recording my screen as gif)
# mas install 1351639930 # Gifski, convert videos to gifs
# mas install 414030210 # Limechat, IRC app.
# else
# echo "App Store login not complete. Skipping installing App Store Apps" $red
# fi
echo "###############################################" $red
#SystemSetup
echo "###############################################" $red
#AutoHide Dock
defaults write com.apple.dock autohide -bool true
#Recent applications in Dock
defaults write com.apple.dock show-recents -bool false
# Require password immediately after sleep or screen saver begins"
defaults write com.apple.screensaver askForPassword -int 1
# 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"
# Use plain text mode for new TextEdit documents
defaults write com.apple.TextEdit RichText -int 0
# Enable the automatic update check
defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true
# Download newly available updates in background
#defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1
# Install System data files & security updates
#defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1
# Prevent Photos from opening automatically when devices are plugged in
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true
#1password
brew install 1password
# Finder: show hidden files by default
defaults write com.apple.finder AppleShowAllFiles -bool true
# Disable the warning when changing a file extension
#defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
echo "Automatically quit printer app once the print jobs complete"
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
echo "Remove the sleep image file to save disk space? (y/n)"
echo "(If you're on a <128GB SSD, this helps but can have adverse affects on performance. You've been warned.)"
read -r response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
sudo rm /Private/var/vm/sleepimage
echo "Creating a zero-byte file instead"
sudo touch /Private/var/vm/sleepimage
echo "and make sure it can't be rewritten"
sudo chflags uchg /Private/var/vm/sleepimage
fi
echo "Disable display from automatically adjusting brightness? (y/n)"
read -r response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
sudo defaults write /Library/Preferences/com.apple.iokit.AmbientLightSensor "Automatic Display Enabled" -bool false
fi
echo ""
echo "Disable keyboard from automatically adjusting backlight brightness in low light? (y/n)"
read -r response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
sudo defaults write /Library/Preferences/com.apple.iokit.AmbientLightSensor "Automatic Keyboard Enabled" -bool false
fi
echo ""
echo "Show dotfiles in Finder by default? (y/n)"
read -r response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
defaults write com.apple.finder AppleShowAllFiles TRUE
fi
echo ""
echo "Show all filename extensions in Finder by default? (y/n)"
read -r response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
fi
echo ""
echo "Setting the icon size of Dock items to 36 pixels for optimal size/screen-realestate"
defaults write com.apple.dock tilesize -int 36
echo ""
echo "Disable local Time Machine backups? (This can take up a ton of SSD space on <128GB SSDs) (y/n)"
read -r response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
hash tmutil &> /dev/null && sudo tmutil disablelocal
fi
echo "###############################################" $red
#npm package
echo "###############################################" $red
npm install -g prettier
npm install -g eslint
echo "###############################################" $red
#pip
echo "###############################################" $red
echo "Python package"
pip3 install pillow
pip3 install pysal
pip3 install pandas
pip3 install geopandas
pip3 install matplotlib
pip3 install rtree
pip3 install ogr
pip3 install descartes
pip3 install geopy
pip install basemap
#conda install -c conda-forge geopandas
echo "###############################################" $red
###############################################################################
# Chrome, Safari, & WebKit
###############################################################################
echo ""
echo "Privacy: Don't send search queries to Apple"
defaults write com.apple.Safari UniversalSearchEnabled -bool false
defaults write com.apple.Safari SuppressSearchSuggestions -bool true
echo ""
echo "Enabling Safari's debug menu"
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
echo ""
echo "Enabling 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
#End Section
echo ""
echo "Done!" $cyan
echo ""
echo ""
echo "################################################################################" $white
echo ""
echo ""
echo "Note that some of these changes require a logout/restart to take effect." $red
echo ""
echo ""
echo -n "Check for and install available OSX updates, install, and automatically restart? (y/n)? "
read response
if [ "$response" != "${response#[Yy]}" ] ;then
softwareupdate -i -a --restart
fi