Skip to content

Instantly share code, notes, and snippets.

@benlower
Last active April 1, 2024 23:58
Show Gist options
  • Save benlower/c18dbb16cb0b862341021aea880b7f41 to your computer and use it in GitHub Desktop.
Save benlower/c18dbb16cb0b862341021aea880b7f41 to your computer and use it in GitHub Desktop.
Setup a new Mac with required apps
echo "Starting up..."
# 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
echo "Updating homebrew..."
brew update
echo "Cleaning up brew"
brew cleanup
# Install NodeJS
echo "Installing Node..."
brew install node
# Install GitHub CLI
echo "Installing GitHub CLI..."
brew install gh
# Install yarn
echo "Installing yarn..."
brew install yarn
# Install xz
echo "Installing xz..."
brew install xz
# Install pyenv
echo "Installing pyenv..."
brew install pyenv
pyenv init
pyenv install 3.9.13
pyenv global 3.9.13
# Install just
echo "Installing just..."
brew install just
# Install git-lfs
echo "Installing git-lfs..."
brew install git-lfs
git lfs install
git lfs pull
# Install fixie SDK
echo "Installing fixie SDK..."
pip install fixieai
fixie auth
# Apps
apps=(
1password
dropbox
github
iterm2
microsoft-edge
microsoft-excel
microsoft-onenote
notion
postman
rectangle-pro
slack
spotify
visual-studio-code
vlc
)
# Install apps to /Applications
# Default is: /Users/$user/Applications
echo "installing apps with Cask..."
brew install --cask --appdir="/Applications" ${apps[@]}
brew cleanup
echo "Please setup and sync Dropbox, and then run this script again."
read -p "Press [Enter] key after this..."
echo "Setting some Mac settings..."
#"Check for software updates daily, not just once per week"
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
#"Showing icons for hard drives, servers, and removable media on the desktop"
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
#"Showing all filename extensions in Finder by default"
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
#"Disabling the warning when changing a file extension"
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
#"Avoiding the creation of .DS_Store files on network volumes"
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
#"Disable 'natural' (Lion-style) scrolling"
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
#Set default screenshot location to clipboard
defaults write com.apple.screencapture "target" -string "clipboard" && killall SystemUIServer
# TODO -> Change default web browser to Edge...where is this set?
killall Finder
echo "Done!"
# Thanks to @bradp who made the original version of this (https://gist.github.com/bradp/bea76b16d3325f5c47d4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment