Last active
October 18, 2018 20:47
-
-
Save johan/6108880 to your computer and use it in GitHub Desktop.
OSX dotfile notes
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
# inspired by https://github.com/alias-mac/dotfiles/blob/master/osx/set-defaults.sh | |
# 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/com.apple.symbolichotkeys.plist | |
# and "Move focus to the widnow drawer" shorcut to ⌥⌘< | |
/usr/libexec/PlistBuddy -c "Set :AppleSymbolicHotKeys:51:value:parameters:1 50" ~/Library/Preferences/com.apple.symbolichotkeys.plist | |
# 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 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 webviews | |
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true | |
# Use scroll gesture with modifier keys to zoom | |
defaults write com.apple.universalaccess closeViewScrollWheelToggle -int 1 | |
defaults write com.apple.AppleMultitouchTrackpad HIDScrollZoomModifierMask -int 262144 | |
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad HIDScrollZoomModifierMask -int 262144 | |
# Finder: show all filename extensions | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
# 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 | |
# see also: https://github.com/acostami/my_osx/blob/master/1_osx.sh | |
# 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/com.google.Chrome.plist | |
# 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 com.apple.screensaver askForPassword -int 1 | |
# Ask for password after 5 min | |
defaults write com.apple.screensaver askForPasswordDelay -int 5 | |
# Enable FileVault | |
#sudo fdesetup enable | |
# Use Swedish - Pro input source | |
defaults write com.apple.HIToolbox AppleCurrentKeyboardLayoutInputSourceID -string "com.apple.keylayout.Swedish-Pro" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also useful: http://best-mac-tips.com/2012/08/29/remapping-os-x-application-keyboard-shortcuts/