Skip to content
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

executable file 443 lines (345 sloc) 13.8 KB
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo "Apple should have already prompted you to install the Xcode CLI tools."
echo "If that didn't happen, go download those now!"
read -p "Then press [Enter] to continue."
echo ""
if [ -f filename ]; then
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Add it to the SSH agent!"
echo "("
read -p "Press [Enter] when done..."
echo ""
echo "You already have a public key, continuing using existing ~/.ssh/"
echo ""
echo "Please go to and add the following public key"
echo "(It should already be in your clipboard, so you can just paste it in)"
echo "---"
echo "$(cat ~/.ssh/"
echo "---"
cat ~/.ssh/ | pbcopy
read -p "Press [Enter] key after this..."
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL"
# Update homebrew recipes
echo "Updating homebrew..."
brew update
echo "Installing things via brew"
brew install ${brew_apps[@]}
echo "Installing RVM and the latest Ruby..."
gpg --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL | bash -s stable --ruby
source ~/.rvm/scripts/rvm
echo "Installing xcselect"
gem install xcode-install
echo "In another CLI tab, run 'xcversion list' and 'xcversion install [latest version]''"
echo "(This takes forever, and can happen in parallel while the rest of this runs)"
read -p "Press [Enter] when that's running..."
echo "Symlinking gitconfig from $DIR/gitconfig"
ln -s "$DIR/gitconfig" ~/.gitconfig
echo "Cleaning up brew"
brew cleanup
echo "Installing homebrew cask"
brew tap homebrew/cask-fonts
#Install Zsh & Oh My Zsh
echo "Installing Oh My ZSH..."
curl -L | sh
echo "Symlinking zshrc and oh-my-zsh config"
ln -s "$DIR/zshrc" ~/.zshrc
ln -s "$DIR/ohmyzsh-custom" ~/.oh-my-zsh/custom
echo "Setting ZSH as shell..."
chsh -s /bin/zsh
# Apps
# dropbox (currently broken?)
# Install apps to /Applications
# Default is: /Users/$user/Applications
echo "Installing apps with Cask..."
brew cask install --appdir="/Applications" ${apps[@]}
brew cask alfred link
brew cask cleanup
brew cleanup
echo "Installing QuickLook plugins..."
brew cask install ${quicklook_plugins[@]}
echo "Installing the mas tool and some MAS apps"
echo "First, you must log into the Mac App Store app"
read -p "Press [Enter] when ready to continue..."
451640037 # Classic Color Meter
418138339 # HTTP Client
928871589 # Noizio
1303222628 # Paprika
964792805 # ??? Currently unavailable
525180431 # Pixen
413965349 # Soulver
425424353 # The Unarchiver
1384080005 # Tweetbot
985367838 # Outlook
# Safari extension (might not work?)
1436953057 # Ghostery Lite
mas install ${mas_apps[@]}
echo "Set up Dropbox and Sync!"
read -p "Press enter when done."
# Set hostname
echo "what should the hostname be?"
read hostname
sudo scutil --set ComputerName $hostname && \
sudo scutil --set HostName $hostname && \
sudo scutil --set LocalHostName $hostname && \
sudo defaults write /Library/Preferences/SystemConfiguration/ NetBIOSName -string $hostname
echo "setting some system preferences..."
#"Allow text selection in Quick Look"
defaults write QLEnableTextSelection -bool TRUE
#"Disabling OS X Gate Keeper"
#"(You'll be able to install any app you want from here on, not just Mac App Store apps)"
sudo spctl --master-disable
sudo defaults write /var/db/SystemPolicy-prefs.plist enabled -string no
defaults write LSQuarantine -bool false
#"Expanding the save panel by default"
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
#"Automatically quit printer app once the print jobs complete"
defaults write "Quit When Finished" -bool true
#"Saving to disk (not to iCloud) by default"
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
#"Check for software updates daily, not just once per week"
defaults write ScheduleFrequency -int 1
#"Disable smart quotes and smart dashes as they are annoying when typing code"
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
#"Enabling full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
#"Disabling press-and-hold for keys in favor of a key repeat"
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
#"Enabling subpixel font rendering on non-Apple LCDs"
defaults write NSGlobalDomain AppleFontSmoothing -int 2
#"Showing icons for hard drives, servers, and removable media on the desktop"
defaults write ShowExternalHardDrivesOnDesktop -bool true
# Show all file extensions
defaults write -g AppleShowAllExtensions -bool true
# Show hidden files
defaults write AppleShowAllFiles true
# Show full path in finder
defaults write _FXShowPosixPathInTitle -bool true
# Unhide user library
chflags nohidden ~/Library
# Show 'quit finder' option
defaults write QuitMenuItem -bool true && \
killall Finder
# Show path bar
defaults write ShowPathbar -bool true
# Don't create .DS_Store on network or USB drives
defaults write DSDontWriteNetworkStores -bool true
defaults write DSDontWriteUSBStores -bool true
# Disable keyboard autocorrect
defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false
# Dock settings
defaults write static-only -bool true
defaults write magnification -bool false
defaults write 'orientation' -string 'left'
defaults write autohide -bool true
killall Dock
#"Showing all filename extensions in Finder by default"
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
#"Disabling the warning when changing a file extension"
defaults write FXEnableExtensionChangeWarning -bool false
#"Use column view in all Finder windows by default"
defaults write FXPreferredViewStyle Clmv
#"Setting email addresses to copy as '' instead of 'Foo Bar <>' in"
defaults write AddressesIncludeNameOnPasteboard -bool false
#"Preventing Time Machine from prompting to use new hard drives as backup volume"
defaults write DoNotOfferNewDisksForBackup -bool true
#"Disable the sudden motion sensor as its not useful for SSDs"
sudo pmset -a sms 0
#"Speeding up wake from sleep to 24 hours from an hour"
sudo pmset -a standbydelay 86400
#"Setting screenshots location to ~/Desktop"
defaults write location ~/Sync/Screenshots
#"Setting screenshot format to PNG"
defaults write type -string "png"
killall SystemUIServer
#"Hiding Safari's bookmarks bar by default"
defaults write ShowFavoritesBar -bool false
#"Hiding Safari's sidebar in Top Sites"
defaults write ShowSidebarInTopSites -bool false
#"Disabling Safari's thumbnail cache for History and Top Sites"
defaults write DebugSnapshotsUpdatePolicy -int 2
#"Enabling Safari's debug menu"
defaults write IncludeInternalDebugMenu -bool true
#"Making Safari's search banners default to Contains instead of Starts With"
defaults write FindOnPageMatchesWordStartsOnly -bool false
#"Removing useless icons from Safari's bookmarks bar"
defaults write ProxiesInBookmarksBar "()"
#"Enabling the Develop menu and the Web Inspector in Safari"
defaults write IncludeDevelopMenu -bool true
defaults write WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write "" -bool true
#"Adding a context menu item for showing the Web Inspector in web views"
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
#"Use `~/Downloads/Incomplete` to store incomplete downloads"
defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true
defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Downloads/Incomplete"
# Remove Mission Control entirely (the pref pane doesn't let you disable the 'drag a window to the top of the screen' interaction,
# which conflicts with how I use BetterTouchTool)
defaults write mcx-expose-disabled -bool TRUE && killall Dock
killall Finder
echo "Symlinking VSCode settings..."
ln -s "$dir/vscode/keybindings.json" ~/Library/Application\ Support/Code/User/keybindings.json
ln -s "$dir/vscode/settings.json" ~/Library/Application\ Support/Code/User/settings.json
echo "Setting up Keybase..."
keybase install
echo "Installed, time to log in and add your device..."
keybase login
echo "Installing nvm"
curl -o- | bash
# TODO: Manually install latest node?
# TODO: bashmarks?
echo "----------"
echo "Go to keyboard settings and map caps lock to ctrl"
echo "Then disable autocorrect (spelling, capitalization, 2 spaces -> period)"
echo "Finally, remove the Spotlight Cmd+Space keyboard shortcut"
read -p "Press [Enter] when done..."
echo "----------"
echo "Set up 1password"
echo "(Use iCloud for sync)"
read -p "Press [Enter] when done..."
echo "----------"
echo "Set up Alfred:"
echo "1. Activate PowerPack (mega supporter license key in 1password)"
echo "2. Confirm Alfred shortcut is Cmd+Space"
echo "3. TODO: Do settings sync? Can they sync?"
read -p "Press [Enter] when done..."
echo "----------"
echo "Safari Setup: Manually enable 1password, Ghostery, and Pocket extensions. They should be installed already."
echo "Then set the default search engine to DuckDuckGo:"
echo "(Open a new browser tab, then click the magnifying glass in the search/URL bar)"
read -p "Press [Enter] when done..."
echo "----------"
echo "Install Solarized into Xcode (TODO: Document this!)"
read -p "Press [Enter] when done..."
echo "----------"
echo "Set up your personal mail by going to Fastmail and generating a new app password. It'll give you a one-click config download link."
read -p "Press [Enter] when done..."
echo "----------"
echo "VS Code:"
echo "TODO for Em: add steps to this file to install extensions via the CLI"
read -p "Press [Enter] when done..."
echo "----------"
echo "Set up BetterTouchTool:"
echo "TODO: Syncing is experimental. Hopefully it'll Just Work next time I need this?"
echo "1. License is in 1p"
echo "2. 3-finger swipe up -> Cmd+T"
echo "3. 3-finger swipe down -> Cmd+W"
echo "4. 3-finger tap -> middle click"
echo "5. Cmd + Alt + Ctrl + Enter -> Maximize current window"
echo "6. Cmd + Alt + Ctrl + Left/Right -> Maximize to left/right side"
echo "7. Set up window snapping"
read -p "Press [Enter] when done..."
echo "----------"
echo "Fantastical:"
echo "The license is in 1p"
echo "Set keyboard shortcut to Cmd+Shift+C"
echo "Set up Google account"
read -p "Press [Enter] when done..."
echo "----------"
echo "Confirm that the Calendar app has set up with my GCal"
read -p "Press [Enter] when done..."
echo "----------"
echo "Trackpad settings: disable data detectors, force click, and mission control swipe."
echo "Enable tap to click"
read -p "Press [Enter] when done..."
echo "----------"
echo "Siri settings: move from Cmd+Space to Option+Space"
read -p "Press [Enter] when done..."
echo "----------"
echo "Set up OmniFocus"
echo "OmniSyncServer and license key in 1p"
echo "Keyboard shortcut = Cmd+Shift+O"
read -p "Press [Enter] when done..."
echo "----------"
echo "Set up iTerm"
echo "Set Solarized Dark (Preferences -> Profiles -> Colors -> Presets)"
echo "Set Fira code font (Preferences -> Profiles -> Text -> Font. Select it, and also enable ligatures)"
read -p "Press [Enter] when done..."
echo "----------"
echo "Configure Dropshare"
echo "TO DO: This is different with Dropshare"
echo "Settings -> General -> [Start at Login, Install CLI Tools]"
echo "Connection: bucket name + domain alias are both '' (get keys from AWS)"
echo "Uploads:"
echo "Screenshots -> Legacy Mode -> Enable"
echo "Sync -> Use it"
read -p "Press [Enter] when done..."
echo "----------"
echo "Set up Bartender, using common sense"
read -p "Press [Enter] when done..."
echo "----------"
echo "TODO: Figure out how to install and set up Karabiner how I like"
echo "Complex modifications: Change caps_lock to control if pressed with other keys, escape if pressed laone"
echo "Alternatively: See if BetterTouchTool can do this"
read -p "Press [Enter] when done..."
echo "...and you're done!"
You can’t perform that action at this time.