Skip to content

Instantly share code, notes, and snippets.

@s1carii
Last active January 6, 2025 14:19
Show Gist options
  • Save s1carii/fa9847d62e573d983cd33c2008643d2f to your computer and use it in GitHub Desktop.
Save s1carii/fa9847d62e573d983cd33c2008643d2f to your computer and use it in GitHub Desktop.
Steps to configure new macOS system
#!/bin/sh
# Installs Homebrew (https://brew.sh), brew packages, and then modifies settings for fresh macOS devices
# Created 11/22/21
# Updated:
# - 1/30/24
# - 1/6/25
# Install homebrew per brew.sh
echo "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# List of Homebrew casks to be installed
CASKS=(
1password
adobe-acrobat-reader
discord
firefox
google-chrome
google-drive
# rectangle # removed because of the new features in macOS 15... neat!
spotify
# visual-studio-code
vscodium
zoom
)
# List of Homebrew Forulae to be installed
FORMULAE=(
neofetch # RIP screenfetch
git
)
# Do Homebrew things
echo "Doing Homebrew things..."
/usr/local/bin/brew install --cask ${CASKS[@]}
/usr/local/bin/brew install --formulae ${FORMULAE[@]}
/usr/local/bin/brew cleanup
# Turn off natural scrolling
echo "Turning off unNatural Scrolling..."
/usr/bin/defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
# Turn on filename extensions
echo "Visible-izing filename extensions..."
/usr/bin/defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Make the Dock less terrible, re: https://developer.apple.com/documentation/devicemanagement/dock
echo "Fixing the dock..."
/usr/bin/defaults write com.apple.Dock tilesize -int 36
/usr/bin/defaults write com.apple.Dock magnification -bool true
/usr/bin/defaults write com.apple.Dock largesize -int 72
/usr/bin/defaults write com.apple.Dock orientation -string left
/usr/bin/defaults write com.apple.Dock autohide -bool true
/usr/bin/defaults write com.apple.Dock autohide-time-modifier -float 0.1
/usr/bin/defaults write com.apple.Dock show-recents -bool false
# Turn off startup sounds
nvram SystemAudioVolume=%80
# Set the clock to something less terrible and restart the process
/usr/bin/defaults write com.apple.menuextra.clock Show24Hour -bool true
/usr/bin/defaults write com.apple.menuextra.clock DateFormat -string "EEE d MMM HH:mm"
# Restart the Dock and ControlCenter to apply settings
/usr/bin/killall ControlCenter Dock
# Turn off mouse acceleration
defaults write .GlobalPreferences com.apple.mouse.scaling -1
# crontab contents: # not sure this is necessary anymore as it auto-updates every invocation
#15 8 * * 1-5 /usr/local/bin/brew update
#20 8 * * 1-5 /usr/local/bin/brew upgrade
#15 15 * * 1-5 /usr/local/bin/brew update
#20 15 * * 1-5 /usr/local/bin/brew upgrade
#!/bin/bash
# Installs Homebrew (https://brew.sh) and desired packages for fresh imaged macOS devices
# Shamelessly stolen from jlzimmer and modified 7/25/19
echo "Installing Homebrew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap homebrew/cask
brew update
# Homebrew taps
TAPS=(
adobe-acrobat-reader
microsoft-teams
homebrew/cask
homebrew/cask-drivers
)
# Homebrew core formulae
FORMULAE=(
gcc
gettext
screenfetch
telnet
tree
wget
)
# Homebrew casks
CASKS=(
#autopkgr
#iterm2
adobe-acrobat-reader
#balenaetcher
#box-sync
#discord
#github
#mysides
powershell
slack
rectangle
visual-studio-code
vlc
#firefox
#google-chrome
)
#brew tap ${TAPS[@]}
brew update
#brew install ${FORMULAE[@]}
brew install --cask ${CASKS[@]}
brew cleanup
# Finder sidebar
#SIDEBAR=(
# `id -un` file:///Users/`id -un`/
# Applications file:///Applications/
# Desktop file:///Users/`id -un`/Desktop/
# Documents file:///Users/`id -un`/Documents/
# Downloads file:///Users/`id -un`/Downloads/
#)
#mysides add ${SIDEBAR[@]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment