Strongly opinionated set of guides to quickly setup OS X Mavericks for web development. By default OS X hides stuff that normal people don't need to see. These settings are better defaults for developers.
I don't want: any sounds, annoying confirmation dialogs, hidden extensions, superflous animations, unnecessary things running like Dashboard, Notification center or Dock(Alfred/spotlight works better for me).
These are my opinions. Read this document through and pick up the good parts to your preferences.
Save the following commands as system-preferences.sh
and run bash system-preferences.sh
###############################################################################
# General #
###############################################################################
echo "Add some Finnish localization"
defaults write NSGlobalDomain AppleLocale -string "fi_FI"
defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters"
defaults write NSGlobalDomain AppleMetricUnits -bool true
echo "Disable the 'Are you sure you want to open this application?' dialog"
defaults write com.apple.LaunchServices LSQuarantine -bool false
echo "Disable Notification Center and remove the menu bar icon"
launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
echo "Disable auto-correct"
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
echo "Show percentage in battery status"
defaults write com.apple.menuextra.battery ShowPercent -string "YES"
defaults write com.apple.menuextra.battery ShowTime -string "NO"
echo "Fix fonth smoothing"
defaults -currentHost write -globalDomain AppleFontSmoothing -int 0
echo "Enable repeat on keydown"
defaults write -g ApplePressAndHoldEnabled -bool false
echo "Use current directory as default search scope in Finder"
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
echo "Show Path bar in Finder"
defaults write com.apple.finder ShowPathbar -bool true
echo "Show Status bar in Finder"
defaults write com.apple.finder ShowStatusBar -bool true
echo "Set a blazingly fast keyboard repeat rate"
defaults write NSGlobalDomain KeyRepeat -int 0.02
echo "Set a shorter Delay until key repeat"
defaults write NSGlobalDomain InitialKeyRepeat -int 12
echo "Show the ~/Library folder"
chflags nohidden ~/Library
echo "Disable rubberband scrolling"
defaults write -g NSScrollViewRubberbanding -bool false
echo "Disable dashboard"
defaults write com.apple.dashboard mcx-disabled -boolean YES
echo "Move dock to left side of screen"
defaults write com.apple.dock orientation -string left
echo "Hide dock automatically"
defaults write com.apple.dock autohide -boolean true
# I actually didn't get this working.. ideas?
echo "Set Dock auto-hide delay"
defaults write com.apple.dock autohide-delay 0
echo "Show all filename extensions in Finder"
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
echo "Expand save panel by default"
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
echo "Expand print panel by default"
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
echo "Avoid creating .DS_Store files on network volumes"
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
echo "Disable the warning when changing a file extension"
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
echo "Require password after a minute after sleep or screen saver begins"
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 60
echo "Use list view in all Finder windows by default"
echo "Four-letter codes for the other view modes: icnv, Nlmv, Flwv"
defaults write com.apple.finder FXPreferredViewStyle -string "Nlmv"
echo "Remove default text from basic screen saver"
defaults write ~/Library/Preferences/com.apple.ScreenSaver.Basic MESSAGE " "
echo "Disable sound effect when changing volume"
defaults write -g com.apple.sound.beep.feedback -integer 0
echo "Disable user interface sound effects"
defaults write com.apple.systemsound 'com.apple.sound.uiaudio.enabled' -int 0
echo "Set system sounds volume to 0"
defaults write com.apple.systemsound com.apple.sound.beep.volume -float 0
###############################################################################
# Trackpad, Mouse, Keyboard, Gestures #
###############################################################################
echo "Enable tap to click (Trackpad)"
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
echo "Use scroll gesture with the Ctrl (^) modifier key to zoom"
defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true
defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144
echo "Follow mouse when zoomed in"
defaults write com.apple.universalaccess closeViewPanningMode -int 0
echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
echo "Tap with two fingers to emulate right click"
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
echo "Disable three finger drag"
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -bool false
echo "Disable automatic rearrangement of spaces based on most recent usage"
defaults write com.apple.dock mru-spaces -bool false
# For reference
# echo "Save screenshots to the desktop"
# defaults write com.apple.screencapture location -string "$HOME/Desktop"
###############################################################################
# Activity monitor #
###############################################################################
echo "Sort Activity Monitor results by CPU usage"
defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage"
defaults write com.apple.ActivityMonitor SortDirection -int 0
echo "Kill affected applications, so the changes apply"
for app in Safari Finder Dock Mail SystemUIServer; do killall "$app" >/dev/null 2>&1; done
After that, you have to do some settings manually. At least on clean Mavericks,
these settings did not have effect when using defaults write
-
Keyboard > Shortcuts > Keyboard
: Move focus to next window shortcut to⌘+§
-
Accessibility > Mouse & Trackpad > Trackpad
: enable dragging with drag lock -
Trackpad
-
I recommend using profiles in Chrome
-
Atom is a new text editor by GitHub. It has a huge community, which I think will lead to death of Sublime Text. Update: Except it is currently painfully slow compared to Sublime Text :(
-
Good replacement for spotlight
-
Important: Homebrew and many other tools need this installed
-
Very good group chat for teams, which has integrations to GitHub, Trello etc.
-
Much better than default Terminal.app
-
Productivity app for creating gesture/mouse/keyboard shortcuts to about any action you can imagine. For example I have binded 3 finger tap to middle click, 3 finger left/right swipes to changing browser/text editor tabs and more.
I tested moom as an alternative, but BetterTouchTool has more features and is free. BetterTouchTool also ships with a killer feature that I've missed most from Ubuntu(Gnome), check it out: https://www.youtube.com/watch?v=wUeKjkpBdCo
-
Replaces bash.
-
Brew is essential for installing libraries and developer stuff easily.
Install some basic tools:
brew install git wget
-
Instead of
cd ~/code/personal/projects/secret/mysecretproject
you can justz mysecretproject
. Fast.Install:
mkdir ~/.bin cd ~/.bin git clone https://github.com/rupa/z.git echo "source ~/.bin/z/z.sh" >> ~/.zshrc
-
Useful helper commands/aliases for git and others
-
When you have difficult binaries to install like OpenCV or other complicated, it might be easier to install them to a vagrant box. Sometimes you just want to
sudo apt-get install python-opencv python-numpy
.If you don't want to pollute your OS X with tons of libraries and binaries(e.g. ruby gems/python packages), you can always spin up a vagrant box. For example you could have one vagrant box for running Python software and another for Ruby.
-
"Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications."
"Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. As a result, IT can ship faster and run the same app, unchanged, on laptops, data center VMs, and any cloud."
-
OS X ships with its own Python but I recommend installing Python with brew. It makes setupping pip and other Python tools easier.
Make sure that your brew installed Python is the one that you are running. If
which python
outputs/usr/bin/python
. Then you need to add/usr/local/bin
to your PATH before/usr/bin
.After installing virtualenv with pip, install also mkvirtualenv for your convenience.
-
Install with: pkg, brew or nvm. I prefer brew.
-
Postgres
Mavericks does not have Postgres installed by default anymore: http://stackoverflow.com/questions/19611505/does-postgresql-exist-on-os-x-mavericks
I think using http://postgresapp.com is the preferred way. Using brew might be fine also, don't know.
-
Windows virtual machines with IE versions
Microsoft provides virtual machines for different Windows + IE version combinations for your testing convenience.
I stole many of the information from these sources:
You might like Homebrew Caskroom! https://github.com/caskroom/homebrew-cask
Think homebrew, but for apps that are distributed via DMG. It solves the vagrant and docker post-install actions, for example.
I'm redoing my Yosemite install and figured that I'd give you a heads-up :)