-
-
Save greg76/5f2e73487e6942a5e5b539730855838e to your computer and use it in GitHub Desktop.
Bootstrap for setting up a new macOS machine
This file contains 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
#!/usr/bin/env bash | |
# | |
# Bootstrap script for setting up a macOS machine | |
# | |
# Requires xcode and tools! | |
xcode-select -p || exit "XCode must be installed! (use the app store)" | |
echo "Starting bootstrapping" | |
# Check for Homebrew, install if we don't have it | |
if test ! $(which brew); then | |
echo "Installing homebrew..." | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
# Update homebrew recipes | |
brew update | |
brew doctor | |
PACKAGES=( | |
ssh-copy-id | |
python3 | |
pipenv | |
pipx | |
jq | |
micro | |
tealdeer | |
terminal-notifier | |
tree | |
zsh-autosuggestions | |
graphviz | |
) | |
echo "Installing packages..." | |
brew install ${PACKAGES[@]} | |
echo "Cleaning up..." | |
brew cleanup | |
echo "Installing cask..." | |
brew tap homebrew/cask | |
CASKS=( | |
iina | |
rocket | |
spotify | |
stats | |
alfred | |
audio-hijack | |
choosy | |
farrago | |
fission | |
google-chrome | |
keyboard-maestro | |
loopback | |
path-finder | |
screenflow | |
sherlock | |
sketch | |
spamsieve | |
sublime-text | |
tower | |
visual-studio-code | |
homebrew/cask-fonts/font-victor-mono | |
qlmarkdown | |
quicklook-json | |
qlimagesize | |
) | |
echo "Installing cask apps..." | |
brew cask install ${CASKS[@]} | |
echo "Installing fonts..." | |
brew tap homebrew/cask-fonts | |
FONTS=( | |
font-inconsolidata | |
font-roboto | |
font-hack-nerd-font | |
font-hack | |
font-source-code-pro | |
font-space-mono | |
) | |
brew cask install ${FONTS[@]} | |
echo "Installing Python packages..." | |
PYTHON_PACKAGES=( | |
black | |
) | |
sudo pip install ${PYTHON_PACKAGES[@]} | |
echo "Configuring OSX..." | |
# Set fast key repeat rate | |
defaults write NSGlobalDomain KeyRepeat -int 0 | |
# Require password as soon as screensaver or sleep mode starts | |
defaults write com.apple.screensaver askForPassword -int 1 | |
defaults write com.apple.screensaver askForPasswordDelay -int 0 | |
# Show filename extensions by default | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
# Enable tap-to-click | |
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true | |
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 | |
echo "Bootstrapping complete" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
eventually I published a more up-to-date version in a repo https://github.com/greg76/macbootstrap