-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.macos
executable file
·347 lines (251 loc) · 14.3 KB
/
.macos
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
#!/usr/bin/env bash
# Resource for finding new user settings: https://www.defaults-write.com
# Close any open System Preferences panes, to prevent them from overriding settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
###############################################################################
# General UI/UX #
###############################################################################
# Set beep sound to peaceful nothing
defaults write NSGlobalDomain com.apple.sound.beep.sound -string ""
# Set to 24 hour clock with date (e.g. Mon Feb 17 16:35)
defaults write NSGlobalDomain AppleICUForce24HourTime -bool true
# Disable automatic capitalization as it’s annoying when typing code
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
# Disable smart dashes as they’re annoying when typing code
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
# Disable automatic period substitution as it’s annoying when typing code
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
# Disable smart quotes as they’re annoying when typing code
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
# Save to disk (not to iCloud) by default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Finder > Preferences > Show warning before removing from iCloud Drive
defaults write com.apple.finder FXEnableRemoveFromICloudDriveWarning -bool false
# Enable iCloud Drive Desktop & Documents Folder
defaults write com.apple.finder FXICloudDriveDesktop -bool true
defaults write com.apple.finder FXICloudDriveDocuments -bool true
defaults write com.apple.finder FXICloudDriveDesktop -bool true
# Show item info (e.g. image dimensions and video length) under item name
defaults write com.apple.finder showItemInfo -bool true
# Calculate all directory sizes in finder
defaults write com.apple.finder calculateAllSizes -bool true
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Disable Touch Bar on Sidecar
defaults write com.apple.sidecar.display showTouchbar -bool false
# Enable Apple Pencil double tap on Sidecar
defaults write com.apple.sidecar.display doubleTapEnabled -bool true
# Remove Siri from Touch Bar control strip
defaults write ~/Library/Preferences/com.apple.controlstrip MiniCustomized '(com.apple.system.brightness, com.apple.system.volume , com.apple.system.mute)'
# Set a fast keyboard repeat rate
# Default is 15 (225 ms)
defaults write -g InitialKeyRepeat -int 15
# Default is 2 (30 ms)
defaults write -g KeyRepeat -int 2
###############################################################################
# Screen #
###############################################################################
# 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
# Show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# Show path bar
defaults write com.apple.finder ShowPathbar -bool true
# Display full POSIX path as Finder window title
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
# Adjust toolbar title rollover delay
defaults write NSGlobalDomain NSToolbarTitleViewRolloverDelay -float 0
# Keep folders on top when sorting by name
defaults write com.apple.finder _FXSortFoldersFirst -bool true
# When performing a search, search the current folder by default
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Avoid creating .DS_Store files on network or USB volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
# 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
# Use list view in all Finder windows by default
# Four-letter codes for the other view modes: `icnv`, `clmv`, `glyv`
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
# Disable the warning before emptying the Trash
defaults write com.apple.finder WarnOnEmptyTrash -bool false
# Show the ~/Library folder
chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library 2> /dev/null
# Show the /Volumes folder
sudo chflags nohidden /Volumes
###############################################################################
# Dock and Dashboard #
###############################################################################
# Set the icon size of Dock items
defaults write com.apple.dock tilesize -int 65
# Minimize windows into their application’s icon
defaults write com.apple.dock minimize-to-application -bool true
# Remove the auto-hiding Dock delay
defaults write com.apple.dock autohide-delay -float 0
# Remove the animation when hiding/showing the Dock
defaults write com.apple.dock autohide-time-modifier -float 0
# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true
###############################################################################
# Safari #
###############################################################################
# Enable the Develop menu
defaults write com.apple.Safari IncludeDevelopMenu -bool true
# Update extensions automatically
defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool true
# Disable usernames and password AutoFill
defaults write com.apple.Safari AutoFillPasswords -bool false
###############################################################################
# Terminal #
###############################################################################
# Add TouchID authentication to Sudo
if [[ ! `grep "pam_tid.so" /etc/pam.d/sudo` ]]; then
echo -e "auth sufficient pam_tid.so\n$(cat /etc/pam.d/sudo)" | sudo tee /etc/pam.d/sudo;
fi
# Disable the `[` line marks
defaults write com.apple.Terminal ShowLineMarks -int 0
###############################################################################
# Time Machine #
###############################################################################
# Prevent Time Machine from prompting to use new hard drives as backup volume
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
###############################################################################
# Activity Monitor #
###############################################################################
# Visualize CPU usage in the Activity Monitor Dock icon
defaults write com.apple.ActivityMonitor IconType -int 5
# Show all processes in Activity Monitor
defaults write com.apple.ActivityMonitor ShowCategory -int 0
# Sort Activity Monitor results by CPU usage
defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage"
defaults write com.apple.ActivityMonitor SortDirection -int 0
###############################################################################
# Address Book, Dashboard, iCal, TextEdit, and Disk Utility #
###############################################################################
# Use plain text mode for new TextEdit documents
defaults write com.apple.TextEdit RichText -int 0
# Open and save files as UTF-8 in TextEdit
defaults write com.apple.TextEdit PlainTextEncoding -int 4
defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4
###############################################################################
# Mac App Store #
###############################################################################
# Enable the automatic update check
defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true
# Check for software updates daily, not just once per week
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
# Download newly available updates in background
defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1
# Install System data files & security updates
defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1
# Automatically download apps purchased on other Macs
defaults write com.apple.SoftwareUpdate ConfigDataInstall -int 1
# Turn on app auto-update
defaults write com.apple.commerce AutoUpdate -bool true
# Allow the App Store to reboot machine on macOS updates
defaults write com.apple.commerce AutoUpdateRestartRequired -bool true
###############################################################################
# Accessibility #
###############################################################################
# Enable Text to Speech
defaults write com.apple.speech.synthesis.general.prefs SpokenUIUseSpeakingHotKeyFlag -bool true
# Set Samantha as default speaker
defaults write com.apple.speech.voice.prefs SelectedVoiceCreator -int 1886745202
defaults write com.apple.speech.voice.prefs SelectedVoiceID -int 184844483
defaults write com.apple.speech.voice.prefs SelectedVoiceName -string "Samantha"
###############################################################################
# Transmission #
###############################################################################
# Use `~/Downloads/Torrents` to store incomplete downloads
defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true
defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Downloads/Torrents"
# Use `~/Downloads` to store completed downloads
defaults write org.m0k.transmission DownloadLocationConstant -bool true
# Don’t prompt for confirmation before downloading
defaults write org.m0k.transmission DownloadAsk -bool false
defaults write org.m0k.transmission MagnetOpenAsk -bool false
# Don’t prompt for confirmation before removing non-downloading active transfers
defaults write org.m0k.transmission CheckRemoveDownloading -bool true
# Trash original torrent files
defaults write org.m0k.transmission DeleteOriginalTorrent -bool true
# Hide the donate message
defaults write org.m0k.transmission WarningDonate -bool false
# Hide the legal disclaimer
defaults write org.m0k.transmission WarningLegal -bool false
# IP block list.
defaults write org.m0k.transmission BlocklistNew -bool true
defaults write org.m0k.transmission BlocklistURL -string "http://john.bitsurge.net/public/biglist.p2p.gz"
defaults write org.m0k.transmission BlocklistAutoUpdate -bool true
# Randomize port on launch
defaults write org.m0k.transmission RandomPort -bool true
###############################################################################
# Optimus Player #
###############################################################################
# Automatically enter full screen and start playing videos in Optimus Player
defaults write mo.darren.optimus.player.mac DMOPEnterFullScreenAutomaticallyOnOpen -bool true
defaults write mo.darren.optimus.player.mac DMOPPlayAutomaticallyOnOpen -bool true
###############################################################################
# Default Applications #
###############################################################################
# Source Code
duti -s com.microsoft.VSCode py all
duti -s com.microsoft.VSCode rb all
duti -s com.microsoft.VSCode c all
duti -s com.microsoft.VSCode cpp all
duti -s com.microsoft.VSCode h all
duti -s com.microsoft.VSCode go all
duti -s com.microsoft.VSCode rs all
duti -s com.microsoft.VSCode sh all
duti -s com.mathworks.matlab m all
# Data Structures
duti -s com.microsoft.VSCode json all
# Configs
duti -s com.microsoft.VSCode yml all
duti -s com.microsoft.VSCode toml all
# FPGA
duti -s com.microsoft.VSCode v all
duti -s com.microsoft.VSCode vhd all
duti -s com.microsoft.VSCode do all
# Web
duti -s com.microsoft.VSCode js all
duti -s com.microsoft.VSCode css all
duti -s com.microsoft.VSCode html all 2> /dev/null
# Notes
duti -s com.microsoft.VSCode md all
# Video
duti -s mo.darren.optimus.player.mac mp4 all
duti -s mo.darren.optimus.player.mac mkv all
duti -s mo.darren.optimus.player.mac m4v all
duti -s mo.darren.optimus.player.mac webm all
duti -s mo.darren.optimus.player.mac avi all
duti -s mo.darren.optimus.player.mac mov all
duti -s mo.darren.optimus.player.mac gif all
# Audio
duti -s mo.darren.optimus.player.mac mp3 all
duti -s mo.darren.optimus.player.mac flac all
duti -s mo.darren.optimus.player.mac m4a all
duti -s mo.darren.optimus.player.mac aac all
duti -s mo.darren.optimus.player.mac ogg all
# Documents without file extension (e.g. .gitignore and .aliases)
duti -s com.microsoft.VSCode Document all