179 lines
7.5 KiB
Bash
179 lines
7.5 KiB
Bash
|
# MacOS reinstall
|
||
|
|
||
|
## Homebrew
|
||
|
/usr/bin/ruby -e "$(curl -fsSL \
|
||
|
https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||
|
|
||
|
brew install zsh coreutils git curl gnupg openssl
|
||
|
brew link --overwrite git
|
||
|
brew link --overwrite gnupg
|
||
|
|
||
|
## Oh-My-Zsh
|
||
|
sh -c "$(curl -fsSL \
|
||
|
https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
||
|
|
||
|
|
||
|
## Git
|
||
|
brew install git
|
||
|
sudo rm -rf /usr/bin/git/
|
||
|
sudo rm /etc/paths.d/git
|
||
|
sudo rm /etc/manpaths.d/git
|
||
|
sudo pkgutil --forget \
|
||
|
--pkgs=GitOSX\.Installer\.git[A-Za-z0-9]*\.[a-z]*.pkg
|
||
|
|
||
|
## Node.js
|
||
|
brew install nodejs npm
|
||
|
sudo npm i -g npm
|
||
|
sudo npm i -g pm2
|
||
|
|
||
|
## Vapor
|
||
|
brew install vapor/tap/vapor
|
||
|
|
||
|
## Go
|
||
|
brew install go
|
||
|
|
||
|
## Set computer name
|
||
|
sudo scutil --set ComputerName "min"
|
||
|
sudo scutil --set LocalHostName "min"
|
||
|
sudo scutil --set HostName "min"
|
||
|
|
||
|
## Enable Apps from all sources
|
||
|
sudo spctl --master-disable
|
||
|
|
||
|
## Show hidden files
|
||
|
defaults write com.apple.finder AppleShowAllFiles -bool true
|
||
|
chflags nohidden ~/Library
|
||
|
killall Finder
|
||
|
|
||
|
## remove window-shadow from screenshots
|
||
|
defaults write com.apple.screencapture disable-shadow -bool true
|
||
|
killall SystemUIServer
|
||
|
|
||
|
## press-and-hold keys NOT to open the ipad-letter-selector
|
||
|
defaults write -g ApplePressAndHoldEnabled -bool false
|
||
|
|
||
|
## remove animations
|
||
|
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
|
||
|
defaults write -g NSBrowserColumnAnimationSpeedMultiplier -float 0
|
||
|
defaults write -g NSDocumentRevisionsWindowTransformAnimation -bool false
|
||
|
defaults write -g NSScrollAnimationEnabled -bool false
|
||
|
defaults write -g NSScrollViewRubberbanding -bool false
|
||
|
defaults write -g NSToolbarFullScreenAnimationDuration -float 0
|
||
|
defaults write -g NSWindowResizeTime -float 0.001
|
||
|
defaults write -g QLPanelAnimationDuration -float 0
|
||
|
defaults write com.apple.Dock autohide-delay -float 0
|
||
|
defaults write com.apple.Dock autohide-delay -float 0
|
||
|
defaults write com.apple.Dock autohide-time-modifier -float 0
|
||
|
defaults write com.apple.Dock expose-animation-duration -float 0
|
||
|
defaults write com.apple.Dock expose-animation-duration -float 0.1
|
||
|
defaults write com.apple.Dock launchanim -bool false
|
||
|
defaults write com.apple.Dock springboard-hide-duration -float 0
|
||
|
defaults write com.apple.Dock springboard-page-duration -float 0
|
||
|
defaults write com.apple.Dock springboard-show-duration -float 0
|
||
|
defaults write com.apple.finder DisableAllAnimations -bool true
|
||
|
defaults write com.apple.Mail DisableReplyAnimations -bool true
|
||
|
defaults write com.apple.Mail DisableSendAnimations -bool true
|
||
|
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
|
||
|
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
|
||
|
killall Finder
|
||
|
killall Dock
|
||
|
|
||
|
ssh-add -K ~/.ssh/github
|
||
|
git config --global core.excludesfile ~/.gitignore
|
||
|
|
||
|
defaults write -g ApplePressAndHoldEnabled -bool false
|
||
|
defaults write -g CursorBlink -string 0
|
||
|
defaults write -g NSTextInsertionPointBlinkPeriod -int 100000000
|
||
|
defaults write cc.omh.Clyppan hideStatusBarIcon 1
|
||
|
|
||
|
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
|
||
|
defaults write NSGlobalDomain AppleFontSmoothing -int 2
|
||
|
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
|
||
|
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
|
||
|
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
|
||
|
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
|
||
|
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
|
||
|
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
|
||
|
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
|
||
|
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
|
||
|
|
||
|
defaults write com.apple.CrashReporter DialogType none
|
||
|
defaults write com.apple.dashboard mcx-disabled -bool true
|
||
|
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
|
||
|
defaults write com.apple.frameworks.diskimages skip-verify -bool true
|
||
|
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
|
||
|
defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
|
||
|
defaults write com.apple.iTunes NSUserKeyEquivalents -dict-add "Target Search Field" "@F"
|
||
|
defaults write com.apple.LaunchServices LSQuarantine -bool false
|
||
|
defaults write com.apple.LaunchServices LSQuarantine -bool false
|
||
|
defaults write com.apple.Mail DisableReplyAnimations -bool true
|
||
|
defaults write com.apple.Mail DisableSendAnimations -bool true
|
||
|
defaults write com.apple.menuextra.battery ShowPercent -string "NO"
|
||
|
defaults write com.apple.menuextra.battery ShowTime -string "YES"
|
||
|
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
|
||
|
defaults write com.apple.screencapture disable-shadow -bool true
|
||
|
defaults write com.apple.terminal StringEncodings -array 4
|
||
|
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
|
||
|
|
||
|
# Dock
|
||
|
defaults write com.apple.dock autohide-delay -float 0
|
||
|
defaults write com.apple.dock autohide-time-modifier -float 0
|
||
|
defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true
|
||
|
defaults write com.apple.dock expose-animation-duration -int 0
|
||
|
defaults write com.apple.dock launchanim -bool false
|
||
|
defaults write com.apple.dock no-glass -bool true
|
||
|
defaults write com.apple.dock show-process-indicators -bool true
|
||
|
defaults write com.apple.dock workspaces-swoosh-animation-off -bool true
|
||
|
defaults write com.apple.dock tilesize -int 20
|
||
|
|
||
|
# Finder
|
||
|
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
|
||
|
defaults write com.apple.finder AppleShowAllFiles -bool true
|
||
|
defaults write com.apple.finder DisableAllAnimations -bool true
|
||
|
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
|
||
|
defaults write com.apple.finder QuitMenuItem -bool true
|
||
|
defaults write com.apple.finder WarnOnEmptyTrash -bool false
|
||
|
|
||
|
# Safari
|
||
|
defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
|
||
|
defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false
|
||
|
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
|
||
|
defaults write com.apple.Safari ProxiesInBookmarksBar "()"
|
||
|
|
||
|
# Disable "Send via Email" in Safari
|
||
|
defaults write com.apple.Safari NSUserKeyEquivalents -dict-add "Email Link to This Page" "\0" "Email This Page" "\0"
|
||
|
|
||
|
# Disable "Send via Email" in Chrome/Canary
|
||
|
defaults write com.google.Chrome NSUserKeyEquivalents -dict-add "Email Page Location" "\0"
|
||
|
defaults write com.google.Chrome.canary NSUserKeyEquivalents -dict-add "Email Page Location" "\0"
|
||
|
|
||
|
# only process one image at a time in ImageOptim
|
||
|
defaults write net.pornel.imageoptim RunConcurrentFiles 1
|
||
|
defaults write net.pornel.imageoptim RunConcurrentDirscans 1
|
||
|
defaults write net.pornel.imageoptim BounceDock -bool false
|
||
|
|
||
|
# expand SaveDialog
|
||
|
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
|
||
|
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
|
||
|
|
||
|
# support for 16:10 monitors in blizzard games
|
||
|
defaults write com.blizzard.heroesofthestorm DesktopModeIsDefault 1
|
||
|
defaults write com.blizzard.starcraft2 DesktopModeIsDefault 1
|
||
|
defaults write com.blizzard.diablo3 DesktopModeIsDefault 1
|
||
|
|
||
|
# Desktop always empty
|
||
|
defaults write com.apple.finder CreateDesktop false
|
||
|
killall Finder
|
||
|
|
||
|
# Disable Apache (who tf is it even for?)
|
||
|
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
|
||
|
|
||
|
# Disable .DS_Store
|
||
|
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
|
||
|
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
|
||
|
defaults write com.apple.desktopservices DSDontWriteLocalStores true
|
||
|
defaults write com.apple.desktopservices DSDontWriteStores true
|
||
|
|
||
|
# Disable root-less -- from recovery terminal (boot with CMD+R pressed)
|
||
|
csrutil disable
|