forked from lukepolo/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
installscript
executable file
·260 lines (175 loc) · 8.13 KB
/
installscript
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
#!/bin/bash
# https://github.com/larrybotha/designer-dotfiles
# https://github.com/mathiasbynens/dotfiles/blob/master/.macos
# Hide "last login" line when starting a new terminal session
touch $HOME/.hushlogin
###############################################################################
# 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 #
###############################################################################
# Finder: disable window animations and Get Info animations
defaults write com.apple.finder DisableAllAnimations -bool true
# Finder: show path bar
defaults write com.apple.finder ShowPathbar -bool true
# Finder: allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true
# Finder: show hidden files by default
defaults write com.apple.finder AppleShowAllFiles -bool true
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Enable snap-to-grid for icons on the desktop and in other icon views
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
###############################################################################
# Dock, Dashboard, and hot corners #
###############################################################################
# Don’t animate opening applications from the Dock
defaults write com.apple.dock launchanim -bool false
# Speed up Mission Control animations
defaults write com.apple.dock expose-animation-duration -float 0.1
# Don’t automatically rearrange Spaces based on most recent use
defaults write com.apple.dock mru-spaces -bool false
# Remove the auto-hiding Dock delay
defaults write com.apple.dock autohide-delay -float 0
# Remove the animation when hiding/showing the Dock
defaults write com.apple.dock autohide-time-modifier -float 0
# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true
#################################################################
### XCode Command Line Tools
#################################################################
echo 'install xcode command line tools'
echo '-----------------'
xcode-select --install
#################################################################
### Mac OS Mojave Required Libraries for below
#################################################################
#echo 'install Mojave missing libraries'
#echo '-----------------'
# brew install openldap libiconv
#################################################################
### GIT
#################################################################
# global gitigore
ln -s $HOME/.dotfiles/shell/.gitignore_global $HOME/.gitignore_global
ln -s $HOME/.dotfiles/shell/.gitconfig $HOME/.gitconfig
git config --global core.excludesfile $HOME/.global-gitignore
clear
# global git config setup
git config --global core.autocrlf true
git config --global user.email [email protected]
# git config --global core.excludesfile $HOME/.global-gitignore
#################################################################
### ZSH
#################################################################
# install zsh
echo 'install oh-my-zhs'
echo '-----------------'
rm -rf $HOME/.oh-my-zsh
curl -L http://install.ohmyz.sh | sh
sudo git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
# sudo git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"
# symlink zsh prefs
rm $HOME/.zshrc
ln -s $HOME/.dotfiles/shell/.zshrc $HOME/.zshrc
# copy spaceship theme over
# sudo ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme" # TODO - this does not appear to copy over
#################################################################
### Homebrew
#################################################################
echo 'install homebrew'
echo '----------------'
echo install homebrew
sudo rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'install wget'
echo '----------------'
echo install wget
brew install wget
# TODO :: does this exist any longer?
# echo 'Install brew-cask'
# echo '-----------------'
# brew tap homebrew/cask
# brew install brew-cask
#################################################################
### Sequel Pro
#################################################################
# echo 'install sequel pro nightly'
# echo '---------------'
# brew cask install homebrew/cask-versions/sequel-pro-nightly
#################################################################
### Node
#################################################################
# install nvm
echo 'install NVM'
echo '...then `nvm install 14.19.0`'
echo '...then install zsh nvm plugin'
echo '---------------'
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.1/install.sh | bash
nvm install 14.19.0
git clone https://github.com/lukechilds/zsh-nvm ~/.oh-my-zsh/custom/plugins/zsh-nvm
#################################################################
### Other
#################################################################
# TODO :: look info
# install finder quicklook plugins
# echo 'install finder quicklook plugins'
# echo '-----------------------------------'
# brew cask install --force qlcolorcode qlstephen qlmarkdown quicklook-json qlprettypatch quicklook-csv betterzipql webp-quicklook suspicious-package
# dos2unix
echo 'install dos2unix'
echo '------------'
brew install dos2unix
echo 'install iterm2'
brew install --cask iterm2
eccho 'install ngrok'
brew install ngrok/ngrok/ngrok
echo 'install sourcetree'
brew install --cask sourcetree
echo 'install sketch'
brew install --cask sketch
echo 'install vscode'
brew install --cask visual-studio-code
echo 'install yarn'
brew install yarn
echo 'install fire code font for terminal'
brew tap homebrew/cask-fonts
brew install --cask font-fira-code
echo 'install flux'
brew install --cask flux
echo 'install spotify'
brew install --cask spotify
#################################################################
### Cleanup
#################################################################
echo 'fixing ZSH'
echo '------------'
cd ~/.oh-my-zsh
git config core.autocrlf input
git rm --cached -r .
git reset --hard
dos2unix ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
dos2unix ~/.oh-my-zsh/custom/plugins/zsh-nvm/zsh-nvm.plugin.zsh
echo '++++++++++++++++++++++++++++++'
echo '++++++++++++++++++++++++++++++'
echo 'all done'
echo '++++++++++++++++++++++++++++++'
echo 'Some optional tidbits'
echo '1. set some sensible os x defaults by running: $HOME/.dotfiles/osx/set-defaults.sh'
echo '2. make a .dotfiles-custom/shell/.(exports,aliases,functions,zshrc) for your personal commands'
echo '++++++++++++++++++++++++++++++'
echo 'Sometimes ZSH has issues with line endings after installing. Just copy the error and paste into their issues https://github.com/robbyrussell/oh-my-zsh/issues'
echo '++++++++++++++++++++++++++++++'
echo 'Please report issues!'