Skip to content

Instantly share code, notes, and snippets.

@johan johan/
Last active Oct 18, 2018

What would you like to do?
OSX dotfile notes
# inspired by
# Enable full keyboard access for all controls (System Preferences → Keyboard → Keyboard Shortcuts)
# (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Change "Move focus to next window" shortcut to ⌘<
/usr/libexec/PlistBuddy -c "Set :AppleSymbolicHotKeys:51:value:parameters:0 60" ~/Library/Preferences/
# and "Move focus to the widnow drawer" shorcut to ⌥⌘<
/usr/libexec/PlistBuddy -c "Set :AppleSymbolicHotKeys:51:value:parameters:1 50" ~/Library/Preferences/
# and never s/autocorrect/autodestroy/; it gets right things wrong more often than the other way around for me
defaults write -g NSAutomaticSpellingCorrectionEnabled -bool true
defaults write NSGlobalDomain WebAutomaticSpellingCorrectionEnabled -int 0
# Cmd-f should find stuff anywhere in the page, just as in Chrome
defaults write FindOnPageMatchesWordStartsOnly -bool false
# Enable the Develop menu and the Web Inspector in Safari
defaults write IncludeDevelopMenu -bool true
defaults write WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write -bool true
# Add a context menu item for showing the Web Inspector in webviews
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
# Use scroll gesture with modifier keys to zoom
defaults write closeViewScrollWheelToggle -int 1
defaults write HIDScrollZoomModifierMask -int 262144
defaults write HIDScrollZoomModifierMask -int 262144
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Disable the warning before emptying the Trash
defaults write WarnOnEmptyTrash -bool false
# Enable AirDrop over Ethernet and on unsupported Macs running Lion
defaults write BrowseAllInterfaces -bool true
# see also:
# Set system time to HH:mm (24h format)
/usr/libexec/PlistBuddy -c 'Add :AppleICUTimeFormatStrings dict' ~/Library/Preferences/.GlobalPreferences.plist
/usr/libexec/PlistBuddy -c 'Add :AppleICUTimeFormatStrings:1 string "HH:mm"' ~/Library/Preferences/.GlobalPreferences.plist
/usr/libexec/PlistBuddy -c 'Add :AppleICUTimeFormatStrings:2 string "HH:mm:ss"' ~/Library/Preferences/.GlobalPreferences.plist
/usr/libexec/PlistBuddy -c 'Add :AppleICUTimeFormatStrings:3 string "HH:mm:ss z"' ~/Library/Preferences/.GlobalPreferences.plist
/usr/libexec/PlistBuddy -c 'Add :AppleICUTimeFormatStrings:4 string "HH:mm:ss zzzz"' ~/Library/Preferences/.GlobalPreferences.plist
# Bring up Chrome Extensions via ⌘E (Window → Extensions)
/usr/libexec/PlistBuddy -c 'Add :NSUserKeyEquivalents:Extensions string @$e' ~/Library/Preferences/
# Region US, Swedish keymap
defaults write NSGlobalDomain AppleLanguages -array "en-US" "sv-US"
defaults write NSGlobalDomain AppleLocale -string "en_US"
defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters"
# Require password after sleep or screen saver begins
defaults write askForPassword -int 1
# Ask for password after 5 min
defaults write askForPasswordDelay -int 5
# Enable FileVault
#sudo fdesetup enable
# Use Swedish - Pro input source
defaults write AppleCurrentKeyboardLayoutInputSourceID -string ""

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.