-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathosx_defaults.sh
executable file
·111 lines (80 loc) · 4.37 KB
/
osx_defaults.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/usr/bin/env bash
# James Rampton's osx defaults, based on various githubber's dotfiles.
# ========================================================================
# General UI
# ========================================================================
# Disable menu bar transparency
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# Show remaining battery time; hide percentage
defaults write com.apple.menuextra.battery ShowPercent -string "NO"
defaults write com.apple.menuextra.battery ShowTime -string "NO"
# Expand save panel
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# Expand print panel
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# Require password immediately after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
# Save to disk (not to iCloud) by default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Disable Dashboard
defaults write com.apple.dashboard mcx-disabled -boolean YES
# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Reset the 'open with' menu
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
# ========================================================================
# Input
# ========================================================================
# 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
# ========================================================================
# Finder
# ========================================================================
# Allow quitting Finder with ⌘+Q, hiding desktop items in the process
defaults write com.apple.finder QuitMenuItem -bool true
# Show the ~/Library and /Library/ folders
chflags nohidden ~/Library
chflags nohidden /Library
# Show status bar in Finder
defaults write com.apple.finder ShowStatusBar -bool true
# Display full POSIX path as Finder window title
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
# Get that dock away
defaults write com.apple.dock orientation -string right
defaults write com.apple.dock pinning -string start
# ========================================================================
# Safari
# ========================================================================
# 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
# Remove useless icons from Safari’s bookmarks bar
defaults write com.apple.Safari ProxiesInBookmarksBar "()"
# Add a context menu item for showing the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
# ========================================================================
# Mail
# ========================================================================
# Send mail with ⌘+Enter
defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\\U21a9"
# ========================================================================
# Misc
# ========================================================================
defaults write com.apple.screencapture location ~/Desktop/
defaults write com.apple.Preview ApplePersistence -bool no
# ========================================================================
# Restart affected processes
# ========================================================================
# Suppresses killall warning
for app in Finder Dock Safari SystemUIServer; do killall "$app" > /dev/null 2>&1; done
echo "Applied OS X defaults. Some changes will take effect after a logout/restart."