forked from csuhta/environment
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathosx
More file actions
executable file
·168 lines (122 loc) · 6.74 KB
/
osx
File metadata and controls
executable file
·168 lines (122 loc) · 6.74 KB
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
164
165
166
167
168
#!/usr/bin/env bash
# Set custom OS X defaults
# See also:
# https://github.com/mathiasbynens/dotfiles
# https://github.com/Wilto/dotfiles/blob/master/bin/osxdefaults
# -----------------------------------------------------------------------------
# GENERAL UI
# -----------------------------------------------------------------------------
# Save to disk (not to iCloud) by default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
# Disable automatic termination of inactive apps
defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
# 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 0
# -----------------------------------------------------------------------------
# DOCK
# -----------------------------------------------------------------------------
# Disable Dashboard completely
defaults write com.apple.dashboard mcx-disabled -boolean YES
# Enable the 2D Dock
defaults write com.apple.dock no-glass -bool true
# Set the icon size of Dock items to 44 pixels
defaults write com.apple.dock tilesize -int 44
# Show indicator lights for open applications
defaults write com.apple.dock show-process-indicators -bool true
# Use the scale effect for window minimizing
defaults write com.apple.dock mineffect scale
# Speed up Mission Control animations
defaults write com.apple.dock expose-animation-duration -float 0.1
# -----------------------------------------------------------------------------
# FINDER
# -----------------------------------------------------------------------------
# Show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Show the ~/Library folder (in OS X Lion)
chflags nohidden ~/Library
# Hide the ~/Public folder
chflags hidden ~/Public
# Use column view in all windows by default
# Four-letter codes for views modes: `icnv`, `Nlsv`, `clmv`, `Flwv`
defaults write com.apple.finder FXPreferredViewStyle -string "clmv"
# Show no mounted media on the desktop
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowMountedServersOnDesktop -bool false
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool false
# -----------------------------------------------------------------------------
# SHEETS/PANELS
# -----------------------------------------------------------------------------
# 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
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# -----------------------------------------------------------------------------
# SCREEN
# -----------------------------------------------------------------------------
# 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 screenshots to ~/Pictures/Screengrabs
mkdir ~/Pictures/Screengrabs
defaults write com.apple.screencapture location -string "$HOME/Pictures/Screengrabs"
# Disable shadow in screenshots
defaults write com.apple.screencapture disable-shadow -bool true
# Enable subpixel font rendering on non-Apple LCDs
defaults write NSGlobalDomain AppleFontSmoothing -int 2
# -----------------------------------------------------------------------------
# DISKS
# -----------------------------------------------------------------------------
# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Disable Time Machine prompts when attaching USB media
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
# -----------------------------------------------------------------------------
# ITUNES
# -----------------------------------------------------------------------------
# Make ⌘ + F focus the search input
defaults write com.apple.iTunes NSUserKeyEquivalents -dict-add "Target Search Field" "@F"
# Disable the Ping sidebar in iTunes
defaults write com.apple.iTunes disablePingSidebar -bool true
# Disable all the other Ping stuff
defaults write com.apple.iTunes disablePing -bool true
# -----------------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------------
# Improved sound quality for Bluetooth headphones or Bluetooth speakers or whatever Bluetooth audio dealie you got goin’ on. Bluetooth.
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 48
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 40
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 48
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Max" 53
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Min" 48
defaults write com.apple.BluetoothAudioAgent "Stream - Flush Ring on Packet Drop (editable)" 30
defaults write com.apple.BluetoothAudioAgent "Stream - Max Outstanding Packets (editable)" 15
defaults write com.apple.BluetoothAudioAgent "Stream Resume Delay" "0.75"
# Speed up Magic Mice
# The maximum available in the preference pane is 3.0
defaults write -g com.apple.mouse.scaling 5.0
# -----------------------------------------------------------------------------
# MISC
# -----------------------------------------------------------------------------
# Only use UTF-8 in Terminal.app
defaults write com.apple.terminal StringEncodings -array 4
# Disable spotlight Dictionary results
defaults write com.apple.spotlight DictionaryLookupEnabled -bool false
# -----------------------------------------------------------------------------
# HUP ALL THE THINGS
# Restart OS X services after running the script
# -----------------------------------------------------------------------------
for app in "Dashboard" "Dock" "Finder" "SystemUIServer" "Terminal" "iTunes"; do
killall "$app" > /dev/null 2>&1
done