-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost-install.sh
executable file
·245 lines (191 loc) · 8.19 KB
/
post-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
241
242
243
244
245
#!/bin/sh
## README
# /!\ This script has been tailored for my own personal needs. Don’t start it without checking every lines ! /!\
# /!\ Ce script d'installation est conçu pour mon usage. Ne le lancez pas sans vérifier chaque commande ! /!\
## La base : Homebrew et les lignes de commande
if test ! $(which brew)
then
echo 'Installation de Homebrew'
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Vérifier que tout est bien à jour
echo 'Updating Hombrew / Mise à jour de Homebrew'
brew update
echo
## Utilitaires pour les autres apps : Cask et mas (Mac App Store)
echo 'Installation de mas, pour installer les apps du Mac App Store.'
brew install mas
echo
echo "Saisir le mail du compte iTunes :"
read COMPTE
echo
echo "Saisir le mot de passe du compte : $COMPTE"
read -s PASSWORD
mas signin $COMPTE "$PASSWORD"
echo
# Installation d'apps avec mas (source : https://github.com/argon/mas/issues/41#issuecomment-245846651)
function install () {
# Check if the App is already installed
mas list | grep -i "$1" > /dev/null
if [ "$?" == 0 ]; then
echo "==> $1 est déjà installée"
echo
else
echo "==> Installation de $1..."
mas search "$1" | { read app_ident app_name ; mas install $app_ident ; }
echo
fi
}
echo 'Installation de Cask, pour installer les autres apps.'
brew tap caskroom/cask
echo
echo 'Tapping homebrew/science, for all the good ML stuffs'
brew tap homebrew/science
echo
echo 'Tapping homebrew/php, for everything needed in PHP'
brew tap homebrew/php
echo
## Installations des logiciels
echo 'Installation des outils en ligne de commande.'
#brew install wget cmake coreutils psutils git ffmpeg node libssh
#brew tap zyedidia/micro
#brew install micro
#gem install sass
brew install ansible ansible-cmdb awscli fleetctl git numpy opencv parallel php55 pyenv pyenv-virtualenv pyenv-virtualenvwrapper python python3 scipy ssh-copy-id vim wget zsh zsh-completions
echo
echo 'Installation des apps : utilitaires.'
#brew cask install alfred sizeup typinator istat-menus google-drive seafile-client flux appcleaner backblaze hosts carbon-copy-cloner aerial
#brew cask uninstall alfred sizeup typinator istat-menus seafile-client flux appcleaner backblaze carbon-copy-cloner aerial xld
brew cask install 1password bartender beardedspice controlplane geektool hosts itsycal mackup spectacle synergy
install "Amphetamine"
install "MacTracker"
echo
#echo "Ouverture de Google Drive pour commencer la synchronisation"
#open -a Google\ Drive
# Installation manuelle de SearchLink
#cd /tmp/ && curl -O http://cdn3.brettterpstra.com/downloads/SearchLink2.2.3.zip && unzip SearchLink2.2.3.zip && cd SearchLink2.2.3 && mv SearchLink.workflow ~/Library/Services/
echo 'Installation des apps : bureautique.'
brew cask install libreoffice
#install "Pages"
#install "Keynote"
#install "Numbers"
echo
echo 'Installation des apps : développement.'
brew install hugo
brew cask install atom bbedit iterm2 studio-3t textmate
install "Xcode"
install "Quiver"
echo
echo 'Installation des apps : Machine Learning.'
brew install r
brew cask install anaconda rstudio
echo
echo 'Installation des apps : communication.'
brew cask install cyberduck google-chrome firefox
install “Slack”
echo
#echo 'Installation des apps : photo et vidéo.'
#brew cask install handbrake handbrakecli imageoptim sketch google-photos-backup qlimagesize
#install "Acorn"
#install "Pixelmator"
#install "JPEG Mini"
#install "Napkin"
#install "Precise Screenshot"
#install "Final Cut Pro"
#install "Logic Pro X"
#install "Motion"
echo
echo 'Installation des apps : loisir.'
#brew install mpv --with-bundle
#brew linkapps mpv # Pour avoir un .app dans le dossier des Applications
#install "TunesArt"
#brew cask install vox xld
brew cask install vox
# DockArt (installation manuelle, faute de mieux)
#cd /tmp/ && curl -O http://www.splook.com/Software/DockArt_files/DockArt2.zip && unzip DockArt2.zip && cd DockArt\ 2.2 && mv DockArt.bundle ~/Library/iTunes/iTunes\ Plug-ins
echo
## ************************* CONFIGURATION ********************************
echo "Configuration de quelques paramètres par défaut…"
## TERMINAL
# ZSH
curl -L git.io/antigen > $HOME/antigen.zsh
## FINDER
# Affichage de la bibliothèque
chflags nohidden ~/Library
# Finder : affichage de la barre latérale / affichage par défaut en mode liste / affichage chemin accès / extensions toujours affichées
defaults write com.apple.finder ShowStatusBar -bool true
defaults write com.apple.finder FXPreferredViewStyle -string “Nlsv”
defaults write com.apple.finder ShowPathbar -bool true
sudo defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Afficher le dossier maison par défaut
defaults write com.apple.finder NewWindowTarget -string "PfHm"
defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/"
# Recherche dans le dossier en cours par défaut
#defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
# Coup d'œîl : sélection de texte
defaults write com.apple.finder QLEnableTextSelection -bool true
# Pas de création de fichiers .DS_STORE
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
## RÉGLAGES DOCK
# Taille du texte au minimum
defaults write com.apple.dock tilesize -int 15
# Agrandissement actif
defaults write com.apple.dock magnification -bool true
# Taille maximale pour l'agrandissement
defaults write com.apple.dock largesize -float 128
## MISSION CONTROL
# Pas d'organisation des bureaux en fonction des apps ouvertes
defaults write com.apple.dock mru-spaces -bool false
# Mot de passe demandé immédiatement quand l'économiseur d'écran s'active
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
## COINS ACTIFS
# En haut à gauche : bureau
#defaults write com.apple.dock wvous-tl-corner -int 4
#defaults write com.apple.dock wvous-tl-modifier -int 0
# En haut à droite : bureau
#defaults write com.apple.dock wvous-tr-corner -int 4
#defaults write com.apple.dock wvous-tr-modifier -int 0
# En bas à gauche : fenêtres de l'application
#defaults write com.apple.dock wvous-bl-corner -int 3
#defaults write com.apple.dock wvous-bl-modifier -int 0
# En bas à droite : Mission Control
#defaults write com.apple.dock wvous-br-corner -int 2
#defaults write com.apple.dock wvous-br-modifier -int 0
## CLAVIER ET TRACKPAD
# Accès au clavier complet (tabulation dans les boîtes de dialogue)
sudo defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Arrêt pop-up clavier façon iOS
sudo defaults write -g ApplePressAndHoldEnabled -bool false
## Répétition touches plus rapide
#sudo defaults write NSGlobalDomain KeyRepeat -int 1
## Délai avant répétition des touches
#sudo defaults write NSGlobalDomain InitialKeyRepeat -int 10
# Alertes sonores quand on modifie le volume
sudo defaults write com.apple.systemsound com.apple.sound.beep.volume -float 1
# Réglages Trackpad : toucher pour cliquer
#sudo defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
#sudo defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
## APPS
# Safari : menu développeur / URL en bas à gauche / URL complète en haut / Do Not Track / affichage barre favoris
defaults write com.apple.safari IncludeDevelopMenu -int 1
defaults write com.apple.safari ShowOverlayStatusBar -int 1
defaults write com.apple.safari ShowFullURLInSmartSearchField -int 1
defaults write com.apple.safari SendDoNotTrackHTTPHeader -int 1
defaults write com.apple.Safari ShowFavoritesBar -bool true
# Photos : pas d'affichage pour les iPhone
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool YES
# TextEdit : .txt par défaut
defaults write com.apple.TextEdit RichText -int 0
# Raccourci pour exporter
#sudo defaults write -g NSUserKeyEquivalents '{"Export…"="@$e";"Exporter…"="@$e";}'
## ************ Fin de l'installation *********
echo "Finder et Dock relancés… redémarrage nécessaire pour terminer."
killall Dock
killall Finder
echo "Derniers nettoyages…"
brew cleanup
rm -f -r /Library/Caches/Homebrew/*
echo "ET VOILÀ !"
echo "Après synchronisation des données cloud, lancer le script post-cloud.sh"