-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathbootstrap.macos
executable file
·188 lines (181 loc) · 10.2 KB
/
bootstrap.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
#!/bin/sh
#
# MacOS-specific system changes. Further inspiration:
# - https://github.com/holman/dotfiles/blob/master/macos/set-defaults.sh
# - https://github.com/mathiasbynens/dotfiles/blob/master/.macos
# -- Updates ----------------------------------------------------------------
# Enable Debug Menu in the Mac App Store
defaults write com.apple.appstore ShowDebugMenu -bool true
# 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
# -- System -----------------------------------------------------------------
# Disable the sound effects on boot.
sudo nvram SystemAudioVolume=" "
# Disable volume key feedback.
defaults write NSGlobalDomain com.apple.sound.beep.feedback -float 0
# Disable the over-the-top focus ring animation.
defaults write NSGlobalDomain NSUseAnimatedFocusRing -bool false
# Increase window resize speed for Cocoa applications.
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
# 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
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
# Adjust toolbar title rollover delay
defaults write NSGlobalDomain NSToolbarTitleViewRolloverDelay -float 0
# Remove duplicates in the “Open With” menu (also see `lscleanup` alias)
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
# Save to disk (not to iCloud) by default.
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Display ASCII control characters using caret notation in standard text
# views. Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt`.
defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true
# 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
# Restart automatically if the computer freezes.
sudo systemsetup -setrestartfreeze on
# Accelerated playback when adjusting the window size (Cocoa applications).
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
# Show language menu in the top right corner of the boot screen.
sudo defaults write /Library/Preferences/com.apple.loginwindow showInputMenu -bool true
# Disable shadow in screenshots.
defaults write com.apple.screencapture disable-shadow -bool true
# Turn off Dashboard.
defaults write com.apple.dashboard mcx-disabled -boolean true
# Don't automatically rearrange Spaces based on most recent use.
defaults write com.apple.dock mru-spaces -bool false
# Automatically hide and show the Dock.
defaults write com.apple.dock autohide -bool true
# Remove the auto-hiding Dock delay
defaults write com.apple.dock autohide-delay -float 0
# Disable animations when you open an application from the Dock.
defaults write com.apple.dock launchanim -bool false
# Do not show recent applications in Dock.
defaults write com.apple.dock show-recents -bool false
# Disable animations when opening and closing windows.
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
# Drag windows anywhere when holding CTRL + CMD.
defaults write -g NSWindowShouldDragOnGesture -bool true
# -- Keyboard ---------------------------------------------------------------
# Set a really fast key repeat.
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 15
# Disable press-and-hold for keys in favor of key repeat.
defaults write -g ApplePressAndHoldEnabled -bool false
# Disable automatic capitalization.
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
# Disable smart dashes.
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
# Disable automatic period.
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
# Disable smart quotes.
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
# Disable auto-correct.
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# -- Spaces -----------------------------------------------------------------
# Disable space navigation when switching applications
defaults write -g AppleSpacesSwitchOnActivate -bool false
defaults write com.apple.dock workspaces-auto-swoosh -bool NO
# -- Finder -----------------------------------------------------------------
# Show the ~/Library folder.
chflags nohidden ~/Library
# Show certain volumes on Desktop.
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
# Always open in list view.
defaults write com.apple.Finder FXPreferredViewStyle Nlsv
# Always show the path bar.
defaults write com.apple.finder ShowPathbar -bool true
# Always show the status bar.
defaults write com.apple.finder ShowStatusBar -bool true
# Disable animations.
defaults write com.apple.finder DisableAllAnimations -bool true
# Show all file extensions.
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# 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 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
# Automatically open a new Finder 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
defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true
# Expand the following File Info panes:
# "General", "Open with", and "Sharing & Permissions"
defaults write com.apple.finder FXInfoPanesExpanded -dict \
General -bool true \
OpenWith -bool true \
Privileges -bool true
# Allow text selection in Quick Look.
defaults write com.apple.finder QLEnableTextSelection -bool true
# Disable animations when opening a Quick Look window.
defaults write -g QLPanelAnimationDuration -float 0
# Do not warn before emptying the trash.
defaults write com.apple.finder WarnOnEmptyTrash -bool false
# Do not warn when moving files out of iCloud.
defaults write com.apple.finder FXEnableRemoveFromICloudDriveWarning -bool false
# Do not warn before emptying the trash.
defaults write com.apple.finder WarnOnEmptyTrash -bool false
# -- Safari -----------------------------------------------------------------
# Privacy: don’t send search queries to Apple.
defaults write com.apple.Safari UniversalSearchEnabled -bool false
defaults write com.apple.Safari SuppressSearchSuggestions -bool true
# Warn about fraudulent websites.
defaults write com.apple.Safari WarnAboutFraudulentWebsites -bool true
# Block pop-up windows.
defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically -bool false
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool false
# Enable Do Not Track.
defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true
# Update extensions automatically.
defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool true
# Disable AutoFill.
defaults write com.apple.Safari AutoFillFromAddressBook -bool false
defaults write com.apple.Safari AutoFillPasswords -bool false
defaults write com.apple.Safari AutoFillCreditCardData -bool false
defaults write com.apple.Safari AutoFillMiscellaneousForms -bool false
# Show the full URL in the address bar (note: this still hides the scheme).
defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true
# Prevent Safari from opening ‘safe’ files automatically after downloading.
defaults write com.apple.Safari AutoOpenSafeDownloads -bool false
# Hide bookmark bar.
defaults write com.apple.Safari ShowFavoritesBar -bool false
# Set up for development.
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
defaults write com.apple.Safari IncludeDevelopMenu -bool true
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true
# Add a context menu item for showing the Web Inspector in web views.
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
# -- Tools ------------------------------------------------------------------
# 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
# Enable the debug menu in Disk Utility.
defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true
defaults write com.apple.DiskUtility advanced-image-options -bool true