-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacrc
236 lines (217 loc) · 7.24 KB
/
macrc
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
# macOS system preferences
# Close System Preferences
osascript -e 'tell application "System Preferences" to quit'
# Prevent .DS_Store file creation over network connections
defaults write com.apple.desktopservices DSDontWriteNetworkStores TRUE
# Use dark menu bar and Dock
defaults write AppleInterfaceStyle -string "Dark"
# Automaticaly hide and show the menu bar
defaults write _HIHideMenuBar -bool true
# Show scroll bars
# Possible values: `WhenScrolling`, `Automatic` and `Always`
defaults write AppleShowScrollBars istring "WhenScrolling"
# Disable natural scroll direction
defaults write ~/Library/Preferences/.GlobalPreferences.plist com.apple.swipescrolldirection -bool False
# Correct spelling automaticaly
defaults write ~/Library/Preferences/.GlobalPreferences.plist WebAutomaticSpellingCorrectionEnabled -bool False
# Correct spelling automaticaly
defaults write ~/Library/Preferences/.GlobalPreferences.plist NSAutomaticSpellingCorrectionEnabled -bool False
# Capitalize words automaticaly
defaults write ~/Library/Preferences/.GlobalPreferences.plist NSAutomaticCapitalizationEnabled -bool False
# Allow Handoff between this Mac and your iCloud devices
defaults write ActivityAdvertisingAllowed -bool false
defaults write ActivityReceivingAllowed -bool false
# Dock magnification
defaults write com.apple.dock magnification -bool false
# Dock size
defaults write com.apple.dock tilesize -int 40
# Dock position on screen
defaults write com.apple.dock orientation -string left
# Automaticaly hide the Dock
defaults write com.apple.dock autohide -bool true
# Right top corner: Launchpad
# defaults write com.apple.dock wvous-tr-corner -int 3
# defaults write com.apple.dock wvous-tr-modifier -int 0
# Right bottom corner: Desktop
# defaults write com.apple.dock wvous-br-corner -int 4
# defaults write com.apple.dock wvous-br-modifier -int 0
# Left bottom corner: Launchpad
# defaults write com.apple.dock wvous-bl-corner -int 11
# defaults write com.apple.dock wvous-bl-modifier -int 0
# Left top corner: Mission Control
# defaults write com.apple.dock wvous-tl-corner -int 2
# defaults write com.apple.dock wvous-tl-modifier -int 0
# Desktop background
sqlite3 $HOME/Library/Application\ Support/Dock/desktoppicture.db "update data set value = '$HOME/Pictures/vim_cheat_sheet_for_programmers_print.png'"
# Require password after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
# Show mirroring options in the menu bar when available
defaults write com.apple.airplay showInMenuBarIfPresent -bool false
# Key Repeat
defaults write KeyRepeat -int 2
# Delay Until Repeat
defaults write InitialKeyRepeat -int 15
# Save screenshots to
defaults write com.apple.screencapture location -string "${HOME}/Pictures"
# Save screenshots in PNG format
# Other options: BMP, GIF, JPG, PDF, TIFF
defaults write com.apple.screencapture type -string "png"
# Finder
# allow quitting via ⌘ + Q, doing so will also hide desktop icons
defaults write com.apple.finder QuitMenuItem -bool true
defaults write com.apple.finder SearchMyDocsLibraryBrowseWithCustomViewStyle -bool false
defaults write com.apple.finder MyDocsLibrarySavedViewStyle -string Nlsv
defaults write com.apple.finder ShowTabView -bool true
defaults write com.apple.finder ShowPathbar -bool true
defaults write com.apple.finder ShowPreviewPane -bool true
# Show the ~/Library folder
chflags nohidden ~/Library
# Show the /Volumes folder
#sudo chflags nohidden /Volumes
# Set language
defaults write NSGlobalDomain AppleLanguages -array "en-RU" "ru-RU"
# Native full screen window
defaults write com.googlecode.iterm2 UseLionStyleFullscreen -bool false
# Confirm 'Quit iTerm2'
defaults write com.googlecode.iterm2 PromptOnQuit -bool false
# Confirm closing multiple sessions
defaults write com.googlecode.iterm2 OnlyWhenMoreTabs -bool false
# Quit when all windows are closed
defaults write com.googlecode.iterm2 QuitWhenAllWindowsClosed -bool true
# Keyboard
# Use F1, F2, etc. keys as standart function keys
defaults write com.apple.keyboard.fnState -bool true
# Copy picture of selected area to the clipboard: F19
defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 31 "
<dict>
<key>enabled</key>
<true/>
<key>value</key>
<dict>
<key>parameters</key>
<array>
<integer>65535</integer>
<integer>80</integer>
<integer>8388608</integer>
</array>
<key>type</key>
<string>standard</string>
</dict>
</dict>
"
# Save picture of selected area as a fiel: F18
defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 30 "
<dict>
<key>enabled</key>
<true/>
<key>value</key>
<dict>
<key>parameters</key>
<array>
<integer>65535</integer>
<integer>79</integer>
<integer>8388608</integer>
</array>
<key>type</key>
<string>standard</string>
</dict>
</dict>
"
# Copy a picture of screen to the clipboard: F17
defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 29 "
<dict>
<key>enabled</key>
<true/>
<key>value</key>
<dict>
<key>parameters</key>
<array>
<integer>65535</integer>
<integer>64</integer>
<integer>8388608</integer>
</array>
<key>type</key>
<string>standard</string>
</dict>
</dict>
"
# Save picture of screen as a file: F16
defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 28 "
<dict>
<key>enabled</key>
<true/>
<key>value</key>
<dict>
<key>parameters</key>
<array>
<integer>65535</integer>
<integer>106</integer>
<integer>8388608</integer>
</array>
<key>type</key>
<string>standard</string>
</dict>
</dict>
"
# Select the previous input source: Ctrl-Space
defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 60 "
<dict>
<key>enabled</key>
<true/>
<key>value</key>
<dict>
<key>parameters</key>
<array>
<integer>32</integer>
<integer>49</integer>
<integer>262144</integer>
</array>
<key>type</key>
<string>standard</string>
</dict>
</dict>
"
# Swap Ctrl<->Caps
defaults write com.apple.keyboard.modifiermapping.1452-620-0 -array-add "
<dict>
<key>HIDKeyboardModifierMappingDst</key>
<integer>30064771296</integer>
<key>HIDKeyboardModifierMappingSrc</key>
<integer>30064771129</integer>
</dict>
<dict>
<key>HIDKeyboardModifierMappingDst</key>
<integer>30064771129</integer>
<key>HIDKeyboardModifierMappingSrc</key>
<integer>30064771296</integer>
</dict>
<dict>
<key>HIDKeyboardModifierMappingDst</key>
<integer>30064771129</integer>
<key>HIDKeyboardModifierMappingSrc</key>
<integer>30064771300</integer>
</dict>
"
# osascript -e '
# tell application "System Preferences"
# reveal anchor "keyboardTab" of pane "com.apple.preference.keyboard"
# end tell
# tell application "System Events" to tell window 1 of process "System Preferences"
# click button "Modifier Keys…" of tab group 1
# tell sheet 1
# tell pop up button 1
# click
# click menu item "Control" of menu 1
# end tell
# tell pop up button 2
# click
# click menu item "Caps Lock" of menu 1
# end tell
# click button "OK"
# end tell
# end tell
# quit application "System Preferences"
# '
#
killall Dock