-
Notifications
You must be signed in to change notification settings - Fork 6
/
.osx
executable file
·129 lines (96 loc) · 5.15 KB
/
.osx
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/bin/sh
# Many of these settings taken (or modified) from:
#
# https://github.com/mathiasbynens/dotfiles/commits/master/.osx
#
# Numbers in square brackets indicate system version on which these settings
# were last verified to work.
# [10.9] Tweak subpixel font rendering (https://wincent.com/wiki/AppleFontSmoothing)
defaults -currentHost write NSGlobalDomain AppleFontSmoothing -int 1
# [10.9] System Preferences -> Desktop & Screen Saver -> Transluscent menu bar -> off
# Requires logout.
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# [10.9] Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
# [10.9] Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
# [10.9] Use plain text mode for new TextEdit documents
defaults write com.apple.TextEdit RichText -int 0
# [10.9] Show the ~/Library folder
chflags nohidden ~/Library
# [10.9] Finder: disable window animations and Get Info animations
defaults write com.apple.finder DisableAllAnimations -bool true
# [10.9] Finder: allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true
# [10.9] Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# [10.9] Disable smart quotes, dashes, ellipses
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
# [10.9] Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# [10.9] Finder: allow quitting via Command-Q; doing so will also hide desktop icons
defaults write com.apple.finder QuitMenuItem -bool true
# [10.9] [Don't] display full POSIX path as Finder window title
defaults write com.apple.finder _FXShowPosixPathInTitle -bool false
# [10.9] Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# [10.9] Finder: show path bar
defaults write com.apple.finder ShowPathbar -bool true
# [10.9] Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
# [10.9] Misc `systemsetup` settings: see `man systemsetup`
sudo systemsetup -settimezone America/Los_Angeles
sudo systemsetup -setusingnetworktime on
sudo systemsetup -setcomputersleep 60
sudo systemsetup -setdisplaysleep 15
sudo systemsetup -setharddisksleep Never
sudo systemsetup -setrestartfreeze on
sudo systemsetup -setremoteappleevents off
# [10.9] Disable the sudden motion sensor as it’s not useful for SSDs
# [Probably useless; no way to verify this command works]
sudo pmset -a sms 0
# [10.9] Disable local Time Machine snapshots
sudo tmutil disable
sudo tmutil disablelocal
# 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
# 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
# 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
# Follow the keyboard focus while zoomed in
defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true
# [10.9] Disable press-and-hold for keys in favor of key repeat
# Requires logout.
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Set a fast keyboard repeat rate (1 ~= 15ms)
# Requires logout.
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 12
# [10.9] Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# Save screenshots to screenshots directory
defaults write com.apple.screencapture location -string "${HOME}/screenshots"
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "png"
# Set the icon size of Dock items to 16 pixels
defaults write com.apple.dock tilesize -int 16
# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true
# Disable Dashboard
defaults write com.apple.dashboard mcx-disabled -bool true
###############################################################################
# Kill affected applications #
###############################################################################
for app in "Activity Monitor" "Address Book" "Calendar" "Contacts" "cfprefsd" \
"Dock" "Finder" "Mail" "Messages" "Safari" "SizeUp" "SystemUIServer" \
"Terminal" "Transmission" "Twitter" "iCal"; do
killall "${app}" > /dev/null 2>&1
done