Skip to content

Instantly share code, notes, and snippets.

@knoopx
Last active March 10, 2022 16:18
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save knoopx/9335644 to your computer and use it in GitHub Desktop.
Save knoopx/9335644 to your computer and use it in GitHub Desktop.
mac bootstrap osx
# change modifier keys
# install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install mas
mas upgrade
# core utils
brew install findutils ssh-copy-id unrar wget git hub gnutls gnu-tar trash fzf
# sudo with touchid
sudo tee -a "auth sufficient pam_tid.so" /etc/pam.d/sudo
# fish shell
brew install fish && \
echo $(brew --prefix)/bin/fish | sudo tee -a /etc/shells && \
chsh -s $(brew --prefix)/bin/fish
# dev tools
brew install ruby node yarn
# osx apps
brew cask install atom google-chrome istat-menus java quicksilver spectacle the-unarchiver xquartz sensiblesidebuttons numi
brew cask install mpv vox
brew cask install appcleaner grandperspective
brew cask install telegram whatsapp skype screenhero limechat
brew cask install plex-media-server musicbrainz-picard
brew cask install docker vmware-fusion harvest hopper-disassembler rowanj-gitx imageoptim
brew cask install soulseek jdownloader transmission
mas install 1176895641 # Spark email client
# dotfiles
brew install mackup
echo -e "[storage]\nengine=icloud" > ~/.mackup.cfg
mackup restore
# disable gatekeeper
sudo spctl --master-disable
## defaults
echo -e '{\n"~ " = ("insertText:", " ");\n}' > ~/Library/KeyBindings/DefaultKeyBinding.dict
defaults write com.apple.universalaccess reduceTransparency -bool true
defaults write com.apple.universalaccess reduceMotion -bool true
# Disable the Character Accent Menu and Enable Key Repeat in Mac OS X
defaults write -g ApplePressAndHoldEnabled -bool false
# Show remaining battery time; hide percentage
# defaults write com.apple.menuextra.battery ShowPercent -string "NO"
# defaults write com.apple.menuextra.battery ShowTime -string "YES"
# Always show scrollbars
# defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
# Disable window zooming animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
#defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 1
# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# Require password immediately after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
# Show status bar in Finder
defaults write com.apple.finder ShowStatusBar -bool true
# Disable disk image verification
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
# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Disable the warning before emptying the Trash
defaults write com.apple.finder WarnOnEmptyTrash -bool false
# Enable AirDrop over Ethernet and on unsupported Macs running Lion
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
# Don’t animate opening applications from the Dock
defaults write com.apple.dock launchanim -bool false
# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true
# Wipe all (default) app icons from the Dock
defaults write com.apple.dock persistent-apps -array
# Prevent Time Machine from prompting to use new hard drives as backup volume
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
# set default menubar items
defaults write com.apple.systemuiserver menuExtras -array \
"/System/Library/CoreServices/Menu Extras/Bluetooth.menu" \
"/System/Library/CoreServices/Menu Extras/AirPort.menu" \
"/System/Library/CoreServices/Menu Extras/Battery.menu" \
"/System/Library/CoreServices/Menu Extras/Clock.menu"
# Save to disk (not to iCloud) by default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Disable “natural” (Lion-style) scrolling
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
# Finder: disable window animations and Get Info animations
defaults write com.apple.finder DisableAllAnimations -bool true
defaults write com.apple.finder NewWindowTarget -string "PfDe"
# Finder: show path bar
defaults write com.apple.finder ShowPathbar -bool true
# When performing a search, search the current folder by default
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
# Use list view in all Finder windows by default
# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
# Expand the following File Info panes:
# “General”, “Open with”, and “Sharing & Permissions”
defaults write com.apple.finder FXInfoPanesExpanded -dict \
General -bool true \
OpenWith -bool true \
Privileges -bool true
# set my theme as default
curl https://raw.githubusercontent.com/knoopx/knoopx.terminal/master/knoopx.terminal > /tmp/knoopx.terminal && open /tmp/knoopx.terminal
defaults write com.apple.Terminal "Default Window Settings" -string knoopx
defaults write com.apple.Terminal "Startup Window Settings" -string knoopx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment