-
-
Save pvinchon/d24a1eadf5425fc95ec20c30ea698702 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# desktop | |
osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/Library/Desktop Pictures/Solid Colors/Solid Aqua Blue.png"' | |
defaults write com.apple.screensaver idleTime Never | |
# finder | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
defaults write com.apple.finder AppleShowAllFiles -bool true | |
defaults write com.apple.finder ShowPathbar -bool true | |
defaults write com.apple.finder FXPreferredViewStyle Clmv | |
# dock | |
defaults write com.apple.dock autohide -bool true | |
defaults write com.apple.dock persistent-apps -array | |
defaults write com.apple.dock static-only -bool true | |
# spaces | |
defaults write com.apple.dock mru-spaces -bool false | |
# status bar | |
defaults write com.apple.menuextra.clock DateFormat "HH:mm" | |
defaults write com.apple.systemuiserver menuExtras '( | |
"/System/Library/CoreServices/Menu Extras/Clock.menu", | |
"/System/Library/CoreServices/Menu Extras/Battery.menu", | |
"/System/Library/CoreServices/Menu Extras/AirPort.menu", | |
"/System/Library/CoreServices/Menu Extras/Bluetooth.menu", | |
"/System/Library/CoreServices/Menu Extras/Volume.menu" | |
)' | |
# keyboard repeat | |
defaults write NSGlobalDomain KeyRepeat -int 1 | |
defaults write NSGlobalDomain InitialKeyRepeat -int 10 | |
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false | |
# store | |
defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true | |
defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1 | |
defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1 | |
# terminal | |
defaults write com.apple.Terminal "Startup Window Settings" Pro | |
defaults write com.apple.Terminal "Default Window Settings" Pro | |
# siri | |
defaults write com.apple.Siri UserHasDeclinedEnable -bool true | |
defaults write com.apple.assistant.support 'Assistant Enabled' 0 | |
# firewall | |
defaults write /Library/Preferences/com.apple.alf globalstate -int 1 | |
# sound | |
defaults write com.apple.systemsound "com.apple.sound.uiaudio.enabled" -int 0 | |
# guest | |
sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled -bool false | |
sudo defaults write /Library/Preferences/com.apple.AppleFileServer guestAccess -bool false | |
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server AllowGuestAccess -bool false | |
# folders | |
mkdir ~/Code || true | |
# brew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# google chrome | |
brew cask install google-chrome | |
# spectable | |
brew cask install spectacle | |
mkdir ~/Library/Application\ Support/Spectacle || true | |
cat <<EOT > ~/Library/Application\ Support/Spectacle/Shortcuts.json | |
[ | |
{ "shortcut_key_binding" : "alt+cmd+up", "shortcut_name" : "MoveToFullscreen" }, | |
{ "shortcut_key_binding" : "alt+cmd+down", "shortcut_name" : "MoveToCenter" }, | |
{ "shortcut_key_binding" : "alt+cmd+left", "shortcut_name" : "MoveToLeftHalf" }, | |
{ "shortcut_key_binding" : "alt+cmd+right", "shortcut_name" : "MoveToRightHalf" }, | |
{ "shortcut_key_binding" : null, "shortcut_name" : "RedoLastMove" }, | |
{ "shortcut_key_binding" : null, "shortcut_name" : "MakeSmaller" }, | |
{ "shortcut_key_binding" : null, "shortcut_name" : "MoveToLowerRight" }, | |
{ "shortcut_key_binding" : null, "shortcut_name" : "MoveToUpperRight" }, | |
{ "shortcut_key_binding" : null, "shortcut_name" : "MoveToBottomHalf" }, | |
{ "shortcut_key_binding" : null, "shortcut_name" : "MoveToNextDisplay" }, | |
{ "shortcut_key_binding" : null, "shortcut_name" : "MoveToTopHalf" }, | |
{ "shortcut_key_binding" : null, "shortcut_name" : "MoveToLowerLeft" }, | |
{ "shortcut_key_binding" : null, "shortcut_name" : "MakeLarger" }, | |
{ "shortcut_key_binding" : null, "shortcut_name" : "UndoLastMove" }, | |
{ "shortcut_key_binding" : null, "shortcut_name" : "MoveToPreviousDisplay" }, | |
{ "shortcut_key_binding" : null, "shortcut_name" : "MoveToNextThird" }, | |
{ "shortcut_key_binding" : null, "shortcut_name" : "MoveToUpperLeft" }, | |
{ "shortcut_key_binding" : null, "shortcut_name" : "MoveToPreviousThird" } | |
] | |
EOT | |
# visual studio | |
brew cask install visual-studio-code | |
ln -s /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code /usr/local/bin/code || true | |
cat <<EOT > ~/Library/Application\ Support/Code/User/settings.json | |
{ | |
"breadcrumbs.enabled": true, | |
"editor.autoClosingBrackets": false, | |
"editor.autoIndent": false, | |
"editor.quickSuggestions": false, | |
"extensions.ignoreRecommendations": true, | |
"files.insertFinalNewline": true, | |
"files.trimFinalNewlines": true, | |
"files.trimTrailingWhitespace": true, | |
"workbench.editor.enablePreview": false, | |
"workbench.editor.openPositioning": "last", | |
"workbench.panel.defaultLocation": "right", | |
"workbench.startupEditor": "newUntitledFile" | |
} | |
EOT | |
# Postman | |
brew cask install postman | |
# git | |
brew install git | |
git config --global user.name "Philippe Vinchon" | |
git config --global user.email [email protected] | |
git config --global core.excludesfile ~/.gitignore | |
cat <<EOT > ~/.gitignore | |
.DS_Store | |
.bloop | |
.metals | |
EOT | |
echo n | ssh-keygen -N '' -f ~/.ssh/id_rsa || true | |
# aws | |
brew install awscli | |
aws configure set region us-east-1 | |
aws configure set format json | |
# docker | |
brew cask install docker | |
code --install-extension PeterJausovec.vscode-docker | |
# haskell | |
brew install haskell-stack | |
code --install-extension justusadam.language-haskell | |
# scala | |
brew cask install java | |
brew install sbt | |
brew install scala | |
code --install-extension scala-lang.scala | |
code --install-extension scalameta.metals | |
# rust | |
brew install rust | |
code --install-extension rust-lang.rust | |
# zsh | |
brew install zsh | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc | |
cat <<EOT >> ~/.zshrc | |
plugins=( | |
brew | |
docker | |
git | |
sbt | |
stack | |
) | |
source $ZSH/oh-my-zsh.sh | |
unsetopt share_history | |
EOT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment