-
Notifications
You must be signed in to change notification settings - Fork 0
/
.osx
executable file
·163 lines (113 loc) · 6.28 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
#!/bin/sh
# OS X tweaks
# Adapted from: http://mths.be/osx
###############################################################################
# General UI/UX
###############################################################################
# Menu bar: show remaining battery time; hide percentage
defaults write com.apple.menuextra.battery ShowPercent -string "NO"
defaults write com.apple.menuextra.battery ShowTime -string "YES"
# Always show scrollbars
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
# Disable window opening/closing animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Check for software updates daily, not just once per week
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
###############################################################################
# Trackpad, mouse, keyboard, Bluetooth accessories, and input
###############################################################################
# Trackpad: enable tap to click
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
# Disable "natural" (Lion-style) scrolling
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
# Enables key repeating
defaults write -g ApplePressAndHoldEnabled -bool false
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Automatically illuminate built-in MacBook keyboard in low light
defaults write com.apple.BezelServices kDim -bool true
# Turn off keyboard illumination when computer is not used for 1 minute
defaults write com.apple.BezelServices kDimTime -int 60
###############################################################################
# Screen #
###############################################################################
# Save screenshots to the desktop
defaults write com.apple.screencapture location -string "$HOME/Desktop"
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "png"
###############################################################################
# Finder #
###############################################################################
# Finder: disable window animations and Get Info animations
defaults write com.apple.finder DisableAllAnimations -bool true
# Finder: show hidden files by default
defaults write com.apple.finder AppleShowAllFiles -bool true
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# Finder: display full POSIX path as window title
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
# Finder: disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Finder: avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Finder: disable disk image verification
defaults write com.apple.frameworks.diskimages skip-verify -bool true
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
# Finder: automatically open a new window when a volume is mounted
defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
# Finder: use column view in all windows by default
# Four-letter codes for the other view modes: `icnv`, `Nlsv`, `clmv`, `Flwv`
defaults write com.apple.finder FXPreferredViewStyle -string "clmv"
# Finder: show the ~/Library folder
chflags nohidden ~/Library
###############################################################################
# Dock, Mission Control
###############################################################################
# Dock: automatically hide and show
defaults write com.apple.dock autohide -bool true
# Dock: enable highlight hover effect for the grid view of a stack
defaults write com.apple.dock mouse-over-hilte-stack -bool true
# Dock: show indicator lights for open applications
defaults write com.apple.dock show-process-indicators -bool true
# Dock: wipe all (default) app icons
# I use Alfred instead of the Dock to launch apps
defaults write com.apple.dock persistent-apps -array
# Speed up Mission Control animations
defaults write com.apple.dock expose-animation-duration -float 0.1
###############################################################################
# iTunes
###############################################################################
# iTunes: disable the Genius sidebar
defaults write com.apple.iTunes disableGeniusSidebar -bool true
# iTunes: disable the Ping sidebar
defaults write com.apple.iTunes disablePingSidebar -bool true
# iTunes: disable all the other Ping stuff
defaults write com.apple.iTunes disablePing -bool true
###############################################################################
# Other applications
###############################################################################
# MacVim: Don't use Lion fullscreen mode
defaults write org.vim.MacVim MMNativeFullScreen 0
# MacVim: Smooth fonts
defaults write org.vim.MacVim AppleSmoothFixedFontsSizeThreshold 1
# MacVim: Show hidden files
defaults write org.vim.MacVim AppleShowAllFiles 1
###############################################################################
# Clean up and restart applications
###############################################################################
# Kill affected applications
for app in Finder Dock iTunes "Google Notifier"; do killall "$app" > /dev/null 2>&1; done
# Restart (some) affected applications
for app in "Google Notifier"; do open -a "$app" > /dev/null 2>&1; done
echo "MacVim may need to be restarted."
echo "Done. Note that some of these changes require a logout/restart to take effect."