Last active
April 18, 2019 21:54
-
-
Save asapzacy/591795152114a262b3e961b20d33152d to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
HOSTNAME="asapzacy" | |
TIMEZONE="America/Los_Angeles" | |
# Close any open System Preferences panes, to prevent them from overriding | |
# settings we’re about to change | |
osascript -e 'tell application "System Preferences" to quit' | |
# Ask for the administrator password upfront | |
sudo -v | |
# Keep-alive: update existing `sudo` time stamp until `.macos` has finished | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
mkdir code | |
mdkir dev | |
mkdir dev/fonts | |
mkdir scripts | |
touch .hushlogin | |
#### | |
# Homebrew | |
#### | |
echo "Installing homebrew..." | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
xcode-select --install | |
brew install asciinema | |
brew install dockutil | |
brew install git | |
brew install mas | |
brew install python | |
brew install tree | |
brew install vim | |
brew install yarn --without-node | |
brew install colordiff | |
brew install the_silver_searcher | |
brew install | |
echo "Installing brew cask..." | |
brew tap caskroom/cask | |
brew tap homebrew/cask-versions | |
brew tap buo/cask-upgrade | |
echo "Installing brew cask apps..." | |
brew cask install alfred | |
brew cask install appcleaner | |
brew cask install cheatsheet | |
brew cask install cyberduck | |
brew cask install discord | |
brew cask install dropbox | |
brew cask install etrecheck | |
brew cask install figma | |
brew cask install firefox | |
brew cask install firefox-nightly | |
brew cask install flux | |
brew cask install google-chrome | |
brew cask install google-chrome-canary | |
brew cask install google-drive-file-stream | |
brew cask install iterm2-beta | |
brew cask install kap | |
brew cask install postman | |
brew cask install safari-technology-preview | |
brew cask install sketch | |
brew cask install spectacle | |
brew cask install spotify | |
brew cask install slack | |
brew cask install timing | |
brew cask install toggl | |
brew cask install visual-studio-code | |
brew cask install qlcolorcode | |
brew cask install qlstephen | |
brew cask install qlmarkdown | |
brew cask install quicklook-json | |
brew cask install qlprettypatch | |
brew cask install quicklook-csv | |
brew cask install betterzip | |
brew cask install qlimagesize | |
brew cask install webpquicklook | |
brew cask install suspicious-package | |
brew cask install qlvideo | |
echo "Installing brew cask fonts..." | |
brew tap homebrew/cask-fonts | |
brew cask install font-inconsolata | |
brew cask install font-open-sans | |
brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup | |
brew cask cleanup | |
mas upgrade | |
#### | |
# oh-my-zsh | |
#### | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
chsh -s /bin/zsh | |
# git node nom brew osx python yarn | |
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | |
#### | |
# Powerline Fonts | |
#### | |
git clone https://github.com/powerline/fonts.git --depth=1 ~/dev/fonts/powerline | |
cd ~/dev/fonts/powerline | |
./install.sh | |
cd - | |
#### | |
# MacOS App Store | |
#### | |
mas install 937984704 # Amphetamine | |
mas install 836505650 # Battery Monitor | |
mas install 1091189122 # Bear | |
mas install 970246631 # Disk Cleaner | |
mas install 442160987 # Flycut | |
mas install 866773894 # Quiver | |
mas install 442168834 # SiteSucker | |
#### | |
# nvm && node | |
#### | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
nvm install 9.0.0 | |
nvm install 10.0.0 | |
nvm install 11.0.0 | |
nvm install 12.0.0 | |
nvm install node | |
#### | |
# git | |
#### | |
git config --global user.name "Zac Arellano" | |
git config --global user.email zacdarellano@gmail.com | |
#### | |
# apple defaults | |
#### | |
# Set computer name (as done via System Preferences → Sharing) | |
sudo scutil --set ComputerName $HOSTNAME | |
sudo scutil --set HostName $HOSTNAME | |
sudo scutil --set LocalHostName $HOSTNAME | |
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string $HOSTNAME | |
# Display ASCII control characters using caret notation in standard text views | |
# Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt` | |
defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true | |
# Set Help Viewer windows to non-floating mode | |
defaults write com.apple.helpviewer DevMode -bool true | |
# Disable the crash reporter | |
defaults write com.apple.CrashReporter DialogType -string "none" | |
# Disable display from half dimming before full display 'sleep' | |
sudo pmset -a halfdim 0 | |
# Sleep options | |
sudo pmset -a displaysleep 5 | |
sudo pmset -a sleep 0 | |
sudo pmset -a disksleep 0 | |
# Wake for network access | |
sudo pmset -a womp 1 | |
# Don't restart after power failure | |
sudo pmset -a autorestart 0 | |
# Wake computer when laptop is opened | |
sudo pmset -a lidwake 1 | |
# Don't wake computer when power source changes | |
sudo pmset -a acwake 0 | |
# Don't dim brightness on any different source | |
sudo pmset -a lessbright 0 | |
# Disable sudden motion sensor | |
sudo pmset -a sms 0 | |
# Set standby delay to 24 hours (default is 1 hour) | |
sudo pmset -a standbydelay 86400 | |
# Disable hibernation (speeds up entering sleep mode) | |
sudo pmset -a hibernatemode 0 | |
# Never go into computer sleep mode | |
sudo systemsetup -setcomputersleep Off > /dev/null | |
# # Remove the sleep image file to save disk space | |
# sudo rm /private/var/vm/sleepimage | |
# # Create a zero-byte file instead… | |
# sudo touch /private/var/vm/sleepimage | |
# # …and make sure it can’t be rewritten | |
# sudo chflags uchg /private/var/vm/sleepimage | |
# Disable the sound effects on boot | |
sudo nvram SystemAudioVolume=" " | |
# Set sidebar icon size to small | |
defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 1 | |
# Set Menubar and Dock to Dark UI | |
defaults write NSGlobalDomain AppleInterfaceStyle -string "Dark" | |
# Disable menu bar transparency | |
defaults write AppleEnableMenuBarTransparency -bool false | |
# Enable touchpad force click | |
defaults write com.apple.trackpad.forceClick -bool true | |
# Disable smooth scrolling | |
defaults write NSScrollAnimationEnabled -bool false | |
# Minimize application window on double-click | |
defaults write AppleMiniaturizeOnDoubleClick -bool true | |
# Disable the over-the-top focus ring animation | |
defaults write NSUseAnimatedFocusRing -bool false | |
# Always show scrollbars | |
defaults write NSGlobalDomain AppleShowScrollBars -string "WhenScrolling" | |
# Increase window resize speed for Cocoa applications | |
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 | |
# Disable transparency in the menu bar and elsewhere on Yosemite | |
defaults write com.apple.universalaccess reduceTransparency -bool true | |
# Expand save panel by default | |
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true | |
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true | |
# Expand print panel by default | |
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true | |
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true | |
# Save to disk (not to iCloud) by default | |
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false | |
# Automatically quit printer app once the print jobs complete | |
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true | |
# Disable the “Are you sure you want to open this application?” dialog | |
defaults write com.apple.LaunchServices LSQuarantine -bool false | |
# Disable Resume system-wide | |
defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false | |
# Reveal IP address, hostname, OS version, etc. when clicking the clock | |
# in the login window | |
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName | |
# Disable automatic capitalization as it’s annoying when typing code | |
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false | |
# Disable smart dashes as they’re annoying when typing code | |
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false | |
# Disable automatic period substitution as it’s annoying when typing code | |
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false | |
# Disable smart quotes as they’re annoying when typing code | |
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false | |
# Disable auto-correct | |
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false | |
# Disable sound effects when changing volume | |
defaults write NSGlobalDomain com.apple.sound.beep.feedback -integer 0 | |
# Disable Siri completely | |
defaults write com.apple.Siri StatusMenuVisible -bool false | |
defaults write com.apple.Siri UserHasDeclinedEnable -bool true | |
defaults write com.apple.assistant.support 'Assistant Enabled' 0 | |
# Remove Time Machine, Airport from menubar | |
for domain in ~/Library/Preferences/ByHost/com.apple.systemuiserver.*; do | |
defaults write "${domain}" dontAutoLoad -array \ | |
"/System/Library/CoreServices/Menu Extras/TimeMachine.menu" \ | |
"/System/Library/CoreServices/Menu Extras/AirPort.menu" | |
done | |
defaults write com.apple.systemuiserver menuExtras -array \ | |
"/System/Library/CoreServices/Menu Extras/Battery.menu" \ | |
"/System/Library/CoreServices/Menu Extras/Bluetooth.menu" \ | |
"/System/Library/CoreServices/Menu Extras/Clock.menu" \ | |
"/System/Library/CoreServices/Menu Extras/TextInput.menu" \ | |
"/System/Library/CoreServices/Menu Extras/User.menu" \ | |
"/System/Library/CoreServices/Menu Extras/Volume.menu" | |
# Enable these apps to automatically open on login | |
# defaults write loginwindow AutoLaunchedApplicationDictionary -array-add \ | |
# '{ "Name" = "Alfred 3" ; "Path" = "/Applications/Alfred\ 3.app"; "Hide" = 1; }' \ | |
# '{ "Name" = "Dropbox" ; "Path" = "/Applications/Dropbox.app"; "Hide" = 1; }' \ | |
# '{ "Name" = "Flux" ; "Path" = "/Applications/Flux.app"; "Hide" = 1; }' \ | |
# '{ "Name" = "Gifox" ; "Path" = "/Applications/Gifox.app"; "Hide" = 1; }' \ | |
# '{ "Name" = "Spectacle" ; "Path" = "/Applications/Spectacle.app"; "Hide" = 1; }' \ | |
# '{ "Name" = "Timing" ; "Path" = "/Applications/Timing.app"; "Hide" = 1; }' | |
osascript -e 'tell application "System Events" to make login item at end with properties { path: "/Applications/Alfred\ 3.app/", hidden: true }' | |
osascript -e "tell application \"System Events\" to make login item at end with properties { path: \"/Applications/Dropbox.app\", hidden: true }" | |
osascript -e "tell application \"System Events\" to make login item at end with properties { path: \"/Applications/Flux.app\", hidden: true }" | |
osascript -e "tell application \"System Events\" to make login item at end with properties { path: \"/Applications/Gifox.app\", hidden: true }" | |
osascript -e "tell application \"System Events\" to make login item at end with properties { path: \"/Applications/Spectacle.app\", hidden: true }" | |
osascript -e "tell application \"System Events\" to make login item at end with properties { path: \"/Applications/Timing.app\", hidden: true }" | |
# Enable user fast switching | |
sudo defaults write /Library/Preferences/.GlobalPreferences MultipleSessionEnabled -bool 'YES' | |
# Speed up Mission Control animations | |
defaults write com.apple.dock expose-animation-duration -float 0.1 | |
# Disable shake mouse pointer to magnify | |
defaults write NSGlobalDomain CGDisableCursorLocationMagnification -bool true | |
# Trackpad: enable tap to click for this user and for the login screen | |
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true | |
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 | |
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 | |
# Disable “natural” (Lion-style) scrolling | |
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false | |
# 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 | |
# Set delay for screensaver (15 mins) | |
defaults write com.apple.screensaver idleTime -900 | |
# Show filename extensions by default | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
# Show hidden files by default | |
defaults write com.apple.finder AppleShowAllFiles -bool true | |
defaults write -g AppleShowAllFiles -bool true | |
# Check for software updates daily, not just once per week | |
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 | |
# Increase sound quality for Bluetooth headphones/headsets | |
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 | |
# Enable full keyboard access for all controls e.g. enable Tab in modal dialog | |
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 | |
# Disable press-and-hold for keys in favor of key repeat | |
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false | |
# Set a blazingly fast keyboard repeat rate | |
defaults write NSGlobalDomain KeyRepeat -int 1 | |
defaults write NSGlobalDomain InitialKeyRepeat -int 10 | |
# Set trackpad & mouse speed to a reasonable number | |
defaults write -g com.apple.trackpad.scaling -float 1.5 | |
defaults write -g com.apple.mouse.scaling -float 1.5 | |
defaults write /Library/Preferences/com.apple.NetworkBrowser EnableODiskBrowsing -bool false | |
# Hide menubar by default | |
defaults write NSGlobalDomain _HIHideMenuBar -bool true | |
# Enable subpixel font rendering on non-Apple LCDs | |
defaults write NSGlobalDomain AppleFontSmoothing -int 2 | |
# Disable automatic display brightness | |
defaults write com.apple.BezelServices dAuto -bool true | |
sudo defaults write /Library/Preferences/com.apple.iokit.AmbientLightSensor "Automatic Display Enabled" -bool true | |
# Disable annoying touchpad gestures | |
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadPinch -bool false | |
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadTwoFingerDoubleTapGesture -bool false | |
defaults write NSGlobalDomain AppleEnableSwipeNavigateWithScrolls -bool false | |
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerVertSwipeGesture -int 0 | |
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadFourFingerHorizSwipeGesture -int 0 | |
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadFiveFingerPinchGesture -int 0 | |
# Set language and text formats | |
# Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with | |
# `Inches`, `en_GB` with `en_US`, and `true` with `false`. | |
defaults write NSGlobalDomain AppleLanguages -array "en" | |
defaults write NSGlobalDomain AppleLocale -string "en_US@currency=USD" | |
defaults write NSGlobalDomain AppleMeasurementUnits -string "Inches" | |
defaults write NSGlobalDomain AppleMetricUnits -bool false | |
# Show language menu in the top right corner of the boot screen | |
sudo defaults write /Library/Preferences/com.apple.loginwindow showInputMenu -bool true | |
# Stop iTunes from responding to the keyboard media keys | |
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null | |
# Set the timezone to $TIMEZONE | |
systemsetup -settimezone $TIMEZONE > /dev/null | |
# Save screenshots to the desktop | |
defaults write com.apple.screencapture location -string "${HOME}/Desktop" | |
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF) | |
defaults write com.apple.screencapture type -string "png" | |
# Enable HiDPI display modes (requires restart) | |
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true | |
# Finder: show status bar | |
defaults write com.apple.finder ShowStatusBar -bool true | |
# Finder: show path bar | |
defaults write com.apple.finder ShowPathbar -bool true | |
# Use list view in all Finder windows by default (options: icnv, clmv, Flwv) | |
defaults write com.apple.finder FXPreferredViewStyle -string "clmv" | |
# Avoid creating of .DS_Store files on network volumes | |
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true | |
# Enable snap-to-grid for icons on the desktop and in other icon views | |
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist | |
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist | |
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist | |
# Set email addresses to copy as 'foo@example.com' instead of 'Foo Bar <foo@example.com>' in Mail.app | |
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false | |
# Remove Dropbox’s green checkmark icons in Finder | |
file=/Applications/Dropbox.app/Contents/Resources/emblem-dropbox-uptodate.icns | |
[ -e "${file}" ] && mv -f "${file}" "${file}.bak" | |
unset file | |
file=/Applications/Dropbox.app/Contents/Resources/overlay-uptodate.icns | |
[ -e "${file}" ] && mv -f "${file}" "${file}.bak" | |
unset file | |
file=/Applications/Dropbox.app/Contents/Resources/check.icns | |
[ -e "${file}" ] && mv -f "${file}" "${file}.bak" | |
unset file | |
# Show the ~/Library folder | |
chflags nohidden ~/Library | |
# Show the /Volumes folder | |
sudo chflags nohidden /Volumes | |
# Disable the warning before emptying the Trash | |
defaults write com.apple.finder WarnOnEmptyTrash -bool false | |
# Empty Trash securely by default | |
defaults write com.apple.finder EmptyTrashSecurely -bool true | |
# Hot Corner: bottom_left → Start screen saver | |
defaults write com.apple.dock wvous-bl-corner -int 5 | |
defaults write com.apple.dock wvous-bl-modifier -int 0 | |
# Hot Corner: bottom_right → Mission Control | |
defaults write com.apple.dock wvous-br-corner -int 2 | |
defaults write com.apple.dock wvous-br-modifier -int 0 | |
# Hot Corner: top_right → Desktop | |
defaults write com.apple.dock wvous-tr-corner -int 4 | |
defaults write com.apple.dock wvous-tr-modifier -int 0 | |
# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons | |
defaults write com.apple.finder QuitMenuItem -bool true | |
# Finder: disable window animations and Get Info animations | |
defaults write com.apple.finder DisableAllAnimations -bool true | |
# Set Desktop as the default location for new Finder windows | |
# For other paths, use `PfLo` and `file:///full/path/here/` | |
defaults write com.apple.finder NewWindowTarget 'PfHm' | |
defaults write com.apple.finder NewWindowTargetPath "'file://$HOME'" | |
# When performing a search: [Search in: current folder] | |
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" | |
# Show icons for hard drives, servers, and removable media on the desktop | |
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true | |
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false | |
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true | |
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true | |
# Setup the menu bar date format | |
defaults write com.apple.menuextra.clock DateFormat -string "MMM d h:mm a" | |
# Disable the warning when changing a file extension | |
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false | |
# Show battery percentage in menubar | |
defaults write com.apple.menuextra.battery ShowPercent -bool true | |
# 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 the icon size of Dock items to 36 pixels | |
defaults write com.apple.dock tilesize -int 36 | |
# grey/blur-out hidden app icons icons in Dock | |
defaults write com.apple.Dock showhidden -boolean yes | |
# Change minimize/maximize window effect | |
defaults write com.apple.dock mineffect -string "scale" | |
# Make Dock icons of hidden applications translucent | |
defaults write com.apple.dock showhidden -bool true | |
# Minimize windows into their application’s icon | |
defaults write com.apple.dock minimize-to-application -bool true | |
# Enable spring loading for all Dock items | |
defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true | |
# Enable the Hovering Highlights for Dock Stacks in OS X | |
defaults write com.apple.dock mouse-over-hilte-stack -bool true | |
# Show indicator lights for open applications in the Dock | |
defaults write com.apple.dock show-process-indicators -bool true | |
# Wipe all (default) app icons from the Dock | |
# This is only really useful when setting up a new Mac, or if you don’t use the Dock to launch apps. | |
defaults write com.apple.dock persistent-apps -array | |
# Animate opening applications from the Dock | |
defaults write com.apple.dock launchanim -bool true | |
# Speed up Mission Control animations | |
defaults write com.apple.dock expose-animation-duration -float 0.1 | |
# Group windows by application in Mission Control | |
defaults write com.apple.dock expose-group-apps -bool true | |
# Disable the Launchpad gesture (pinch with thumb and three fingers) | |
defaults write com.apple.dock showLaunchpadGestureEnabled -int 0 | |
# Don’t automatically rearrange Spaces based on most recent use | |
defaults write com.apple.dock mru-spaces -bool false | |
# Don’t show Dashboard as a Space | |
defaults write com.apple.dock dashboard-in-overlay -bool true | |
# Privacy: don’t send search queries to Apple | |
defaults write com.apple.Safari UniversalSearchEnabled -bool false | |
defaults write com.apple.Safari SuppressSearchSuggestions -bool true | |
# Press Tab to highlight each item on a web page | |
defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true | |
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true | |
# Show the full URL in the address bar (note: this still hides the scheme) | |
defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true | |
# Prevent Safari from opening ‘safe’ files automatically after downloading | |
defaults write com.apple.Safari AutoOpenSafeDownloads -bool false | |
# Allow hitting the Backspace key to go to the previous page in history | |
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true | |
# Hide Safari’s bookmarks bar by default | |
defaults write com.apple.Safari ShowFavoritesBar -bool false | |
# Hide Safari’s sidebar in Top Sites | |
defaults write com.apple.Safari ShowSidebarInTopSites -bool false | |
# Disable Safari’s thumbnail cache for History and Top Sites | |
defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 | |
# Enable Safari’s debug menu | |
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true | |
# Make Safari’s search banners default to Contains instead of Starts With | |
defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false | |
# Enable the Develop menu and the Web Inspector in Safari | |
defaults write com.apple.Safari IncludeDevelopMenu -bool true | |
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true | |
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true | |
# Add a context menu item for showing the Web Inspector in web views | |
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true | |
# Enable continuous spellchecking | |
defaults write com.apple.Safari WebContinuousSpellCheckingEnabled -bool true | |
# Disable auto-correct | |
defaults write com.apple.Safari WebAutomaticSpellingCorrectionEnabled -bool false | |
# Disable plug-ins | |
defaults write com.apple.Safari WebKitPluginsEnabled -bool false | |
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2PluginsEnabled -bool false | |
# Disable Java | |
defaults write com.apple.Safari WebKitJavaEnabled -bool false | |
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled -bool false | |
# Block pop-up windows | |
defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically -bool false | |
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool false | |
# Enable “Do Not Track” | |
defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true | |
# Update extensions automatically | |
defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool true | |
# Only use UTF-8 in Terminal.app | |
defaults write com.apple.terminal StringEncodings -array 4 | |
# Don’t display the annoying prompt when quitting iTerm and Terminal | |
defaults write com.googlecode.iterm2 PromptOnQuit -bool false | |
defaults write com.apple.Terminal NSUserKeyEquivalents -dict-add "Quit Terminal" nil | |
# Prevent Time Machine from prompting to use new hard drives as backup volume | |
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true | |
# Show the main window when launching Activity Monitor | |
defaults write com.apple.ActivityMonitor OpenMainWindow -bool true | |
# Visualize CPU usage in the Activity Monitor Dock icon | |
defaults write com.apple.ActivityMonitor IconType -int 5 | |
# Show all processes in Activity Monitor | |
defaults write com.apple.ActivityMonitor ShowCategory -int 0 | |
# Sort Activity Monitor results by CPU usage | |
defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage" | |
defaults write com.apple.ActivityMonitor SortDirection -int 0 | |
# Use plain text mode for new TextEdit documents | |
defaults write com.apple.TextEdit RichText -int 0 | |
# Open and save files as UTF-8 in TextEdit | |
defaults write com.apple.TextEdit PlainTextEncoding -int 4 | |
defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 | |
# Enable the WebKit Developer Tools in the Mac App Store | |
defaults write com.apple.appstore WebKitDeveloperExtras -bool true | |
# Enable Debug Menu in the Mac App Store | |
defaults write com.apple.appstore ShowDebugMenu -bool true | |
# Enable the automatic update check | |
defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true | |
# Check for software updates daily, not just once per week | |
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 | |
# Download newly available updates in background | |
defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1 | |
# Install System data files & security updates | |
defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1 | |
# Turn on app auto-update | |
defaults write com.apple.commerce AutoUpdate -bool true | |
# Allow the App Store to reboot machine on macOS updates | |
defaults write com.apple.commerce AutoUpdateRestartRequired -bool true | |
# Prevent Photos from opening automatically when devices are plugged in | |
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true | |
# Disable automatic emoji substitution (i.e. use plain text smileys) | |
defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticEmojiSubstitutionEnablediMessage" -bool false | |
# Disable smart quotes as it’s annoying for messages that contain code | |
defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false | |
# Disable continuous spell checking | |
defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false | |
# Disable the all too sensitive backswipe on trackpads | |
defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false | |
defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -bool false | |
# Disable the all too sensitive backswipe on Magic Mouse | |
defaults write com.google.Chrome AppleEnableMouseSwipeNavigateWithScrolls -bool false | |
defaults write com.google.Chrome.canary AppleEnableMouseSwipeNavigateWithScrolls -bool false | |
# Use the system-native print preview dialog | |
defaults write com.google.Chrome DisablePrintPreview -bool true | |
defaults write com.google.Chrome.canary DisablePrintPreview -bool true | |
# Automatically hide and show the Dock | |
defaults write com.apple.dock autohide -bool true | |
# Expand the print dialog by default | |
defaults write com.google.Chrome PMPrintingExpandedStateForPrint2 -bool true | |
defaults write com.google.Chrome.canary PMPrintingExpandedStateForPrint2 -bool true | |
# Allow text selection in Quick Look | |
defaults write com.apple.finder QLEnableTextSelection -bool TRUE | |
# Remove the auto-hiding Dock delay | |
defaults write com.apple.dock autohide-delay -float 0 | |
# Remove the animation when hiding/showing the Dock | |
# defaults write com.apple.dock autohide-time-modifier -float 0 | |
# Wipe all (default) app icons from the Dock | |
# This is only really useful when setting up a new Mac, or if you don’t use the Dock to launch apps. | |
defaults write com.apple.dock persistent-apps -array | |
# Add items to dock | |
dockutil --add /Applications/Google\ Chrome.app | |
dockutil --add /Applications/Visual\ Studio\ Code.app | |
dockutil --add /Applications/iTerm.app | |
dockutil --add /Applications/Sketch.app | |
dockutil --add /Applications/Slack.app | |
dockutil --add /Applications/Spotify.app | |
dockutil --add /Applications/Calendar.app | |
# Disable battery charging chime | |
defaults write com.apple.PowerChime ChimeOnAllHardware -bool false | |
defaults write com.apple.PowerChime ChimeOnNoHardware -bool true; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment