-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
240 lines (212 loc) · 7.36 KB
/
install.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
#!/bin/bash
# set the hostname
echo "Enter the name for the computer:"
read newhostname
sudo scutil --set HostName $newhostname
xcode-select --install
# install brew and brew cask
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew tap homebrew/cask-versions
brew tap homebrew/cask-fonts
sudo chown -R $USER /usr/local/*
export PATH="/usr/local/bin:$PATH"
# install all software
## python
sudo easy_install -U Pygments
sudo easy_install httpcode
## terminal
brew install coreutils
brew install direnv
brew install exiftool
brew install fzf
brew install git
brew install jid
brew install mas
brew install node
brew install nvm
mkdir ~/.nvm
brew install the_silver_searcher
brew install tree
brew install yarn
## browsers
brew install --cask firefox
brew install --cask firefox-developer-edition
brew install --cask google-chrome
# brew install --cask blisk
# brew install --cask brave
# brew install --cask firefox-beta
# brew install --cask google-chrome-canary
# brew install --cask opera
# brew install --cask opera-beta
# brew install --cask opera-developer
# brew install --cask safari-technology-preview
# brew install --cask servo
# brew install --cask vivaldi
# brew install --cask webkit-nightly
## applications
brew install --cask aerial
brew install --cask alfred
brew install --cask authy
brew install --cask discord
brew install --cask iterm2
brew install --cask itsycal
brew install --cask kap
brew install --cask keepingyouawake
brew install --cask notion
brew install --cask numi
brew install --cask rectangle
brew install --cask runcat
brew install --cask runjs
brew install --cask shottr
brew install --cask sip
brew install --cask slack
brew install --cask transmit
brew install --cask visual-studio-code
brew install --cask vlc
# brew install --cask tunnelbear
# brew install --cask atom
# brew install --cask betterzipql
# brew install --cask docker
# brew install --cask lacona
# brew install --cask mou
# brew install --cask sublime-text
# brew install --cask tunnelblick
## finder preview
brew install --cask qlcolorcode
brew install --cask qlimagesize
brew install --cask qlmarkdown
brew install --cask qlprettypatch
brew install --cask qlstephen
brew install --cask qlvideo
brew install --cask quicklook-csv
brew install --cask quicklook-json
brew install --cask quicklookase
brew install --cask suspicious-package
brew install --cask webpquicklook
## fonts
brew install --cask font-fira-code
printf "\n==== Install Dank Mono font ====\n\n"
## app store
mas install 990588172 ## Gestimer
mas install 507257563 ## Sip
mas install 1429033973 ## Runcat
# open background applications
open -a alfred\ 4
open -a gestimer
open -a itsycal
open -a keepingyouawake
open -a rectangle
open -a runcat
open -a sip
## node
npm i -g npm
# npm i -g bower
npm i -g caniuse-cmd
npm i -g code-stats
npm i -g diff-so-fancy
npm i -g eslint
npm i -g git-bc
# npm i -g grunt-cli
npm i -g gulp-cli
npm i -g how2
npm i -g http-server
npm i -g nodemon
npm i -g ntl
npm i -g pageres-cli
npm i -g sloc
npm i -g space-hogs
npm i -g stylelint
npm i -g stylestats
npm i -g tldr
npm i -g webpack
npm i -g webpagetest
npm i -g yo
# remove last login message in terminal
touch ~/.hushlogin
# generate and print public ssh-key
ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -P ""
printf "\n\n\n==== Generated SSH Public key ====\n`cat ~/.ssh/id_rsa.pub`\n===========\n\n"
printf "\n\n\n==== Login on NPM ====\n"
# configure npm
npm adduser
# setup works folders
cd ~
mkdir works
cd works
# clone and setup dotfiles
git clone https://github.com/gcmznt/dotfiles.git
cd dotfiles
## init z submodule
git submodule init
git submodule update
# configure git
cp ~/works/dotfiles/.gitconfig ~/.gitconfig
# bootstrap bash_profile
cp ~/works/dotfiles/.bash_profile_home_example ~/.bash_profile
sed -i '' 's/giko/'$(whoami)'/g' ~/.bash_profile
cp ~/works/dotfiles/.inputrc ~/.inputrc
# configure macosx (https://gist.github.com/erikh/2260182)
## Enable full keyboard access for all controls
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
## Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
## Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Enable tap to click (Trackpad)
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
# Enable Safari’s debug menu
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
# Only Show Open Applications In The Dock
defaults write com.apple.dock static-only -bool true
# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true
# Show all filename extensions in Finder
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Use current directory as default search scope in Finder
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
# Show Path bar in Finder
defaults write com.apple.finder ShowPathbar -bool true
# Show Status bar in Finder
defaults write com.apple.finder ShowStatusBar -bool true
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# 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
# Automatically open a new Finder window when a volume is mounted
defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true
# Show item info below desktop icons
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
# Enable snap-to-grid for desktop icons
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 0.02
# Set a shorter Delay until key repeat
defaults write NSGlobalDomain InitialKeyRepeat -int 12
# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# Allow quitting Finder via ⌘ + Q; doing so will also hide desktop icons
defaults write com.apple.finder QuitMenuItem -bool true
# Show hidden files
defaults write com.apple.finder AppleShowAllFiles YES
# Change Apple OS X Dock size
defaults write com.apple.dock tilesize -int 32
# Change screen saver
defaults write com.apple.screensaver "moduleDict" -dict-add "moduleName" -string "Aerial"
defaults write com.apple.screensaver "moduleDict" -dict-add "path" -string "/Users/"$(whoami)"/Library/Screen Savers/Aerial.saver"
# Mostra percentuale batteria
defaults write com.apple.menuextra.battery ShowPercent YES
# Imposta formato orologio
defaults write com.apple.menuextra.clock DateFormat -string "HH:mm"
# Evita riordino spaces
defaults write com.apple.dock mru-spaces -bool false
# reload all application affected
for app in Safari Finder Dock Mail SystemUIServer; do
killall "$app" >/dev/null 2>&1;
done