blob: 32199663e55ddc30ac1eb62ebece557c09ae11af (
plain)
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
|
#!/usr/bin/env bash
set -ex
#########################################################################
# Keyboard
#########################################################################
# Repeat keys while held down
defaults write -g ApplePressAndHoldEnabled -bool FALSE
# Repeat keys without delay
defaults write -g InitialKeyRepeat -float 15
# Fastest key repeat rate
defaults write -g KeyRepeat -float 2
# Use F1, F2, etc. keys as standard function keys
defaults write -g com.apple.keyboard.fnState -bool TRUE
#########################################################################
# Finder
#########################################################################
# Open new window in home directory
defaults write com.apple.finder NewWindowTarget PfHm
# Show breadcrumbs
defaults write com.apple.finder ShowPathbar 1
# Show status bar (file count and available storage)
defaults write com.apple.finder ShowStatusBar 1
# Show all filename extensions
defaults write -g AppleShowAllExtensions 1
# No warning before changing an extension
defaults write com.apple.finder FXEnableExtensionChangeWarning 0
# No warning before emptying the Trash
defaults write com.apple.finder WarnOnEmptyTrash 0
# Remove items from the Trash after 30 days
defaults write com.apple.finder FXRemoveOldTrashItems 1
# Search the current folder
defaults write com.apple.finder FXDefaultSearchScope SCcf
# Show hard disks, external disks, removables, and servers on desktop
defaults write com.apple.finder ShowHardDrivesOnDesktop 1
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop 1
defaults write com.apple.finder ShowRemovableMediaOnDesktop 1
defaults write com.apple.finder ShowMountedServersOnDesktop 1
#########################################################################
# Desktop & Dock
#########################################################################
# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool TRUE
# Remove auto-hide delay
defaults write com.apple.dock autohide-delay -float 0
# Animate auto-hide (500ms)
defaults write com.apple.dock autohide-time-modifier -float 0.5
# Position Dock on the left
defaults write com.apple.dock orientation left
# Small icons in Dock
defaults write com.apple.dock tilesize -int 36
# Hide suggested and recent apps in Dock
defaults write com.apple.dock show-recents -bool FALSE
# Customize Hot Corners
#
# Allowed corner values:
# 1: - (Do nothing)
# 2: Mission Control
# 3: Application Windows
# 4: Desktop
# 5: Start Screen Saver
# 5: Disable Screen Saver
# 10: Put Display to Sleep
# 11: Apps
# 12: Notification Center
# 13: Lock Screen
# 14: Quick Note
defaults write com.apple.dock wvous-bl-corner -int 1
defaults write com.apple.dock wvous-bl-modifier -int 0
defaults write com.apple.dock wvous-br-corner -int 1
defaults write com.apple.dock wvous-br-modifier -int 0
defaults write com.apple.dock wvous-tl-corner -int 1
defaults write com.apple.dock wvous-tl-modifier -int 0
defaults write com.apple.dock wvous-tr-corner -int 1
defaults write com.apple.dock wvous-tr-modifier -int 0
# Hide widgets on desktop
defaults write com.apple.WindowManager StandardHideWidgets -bool TRUE
#########################################################################
# Spotlight
#########################################################################
# Exclude selected results from Spotlight
defaults write com.apple.Spotlight EnabledPreferenceRules -array \
'System.files' \
'System.folders' \
'System.iphoneApps' \
'com.apple.AddressBook' \
'com.apple.AppStore' \
'com.apple.MobileSMS' \
'com.apple.Notes' \
'com.apple.Photos' \
'com.apple.Safari' \
'com.apple.VoiceMemos' \
'com.apple.clock' \
'com.apple.freeform' \
'com.apple.iBooksX' \
'com.apple.iCal' \
'com.apple.iWork.Keynote' \
'com.apple.iWork.Numbers' \
'com.apple.mail' \
'com.apple.mobilephone' \
'com.apple.news' \
'com.apple.podcasts' \
'com.apple.reminders' \
'com.apple.shortcuts' \
'com.apple.systempreferences' \
'com.apple.tips' \
;
#########################################################################
# Siri
#########################################################################
# Turn off Siri
defaults write com.apple.assistant.support 'Assistant Enabled' -bool FALSE
# Do not activate Siri by voice
defaults write com.apple.Siri VoiceTriggerUserEnabled -bool FALSE
#########################################################################
# Safari
#########################################################################
# Do not close tabs automatically
defaults write com.apple.Safari CloseTabsAutomatically -int 0
# Remove history items manually
defaults write com.apple.Safari HistoryAgeInDaysLimit -int 365000
# Command-click opens a new tab
defaults write com.apple.Safari CommandClickMakesTabs -bool TRUE
# Use Command-1 through Command-9 to switch tabs
defaults write com.apple.Safari Command1Through9SwitchesTabs -bool TRUE
# Search with DuckDuckGo
defaults write com.apple.Safari SearchProviderShortName DuckDuckGo
# Private Browsing uses the same search engine as normal browsing
defaults write com.apple.Safari PrivateSearchEngineUsesNormalSearchEngineToggle -bool TRUE
# Warn before connecting to a website over HTTP
defaults write com.apple.Safari UseHTTPSOnly -bool TRUE
# Disable ad measurement
defaults write com.apple.Safari WebKitPreferences.privateClickMeasurementEnabled -bool FALSE
# Show full website address
defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool TRUE
# Show features for web developers
defaults write com.apple.Safari IncludeDevelopMenu -bool TRUE
#########################################################################
# Terminal
#########################################################################
# Enable secure keyboard entry
defaults write com.apple.Terminal SecureKeyboardEntry -bool TRUE
# Use Command-1 through Command-9 to switch tabs
defaults write com.apple.Terminal Command1Through9SwitchesTabs -bool TRUE
# Basic profile
PLIST="$HOME/Library/Preferences/com.apple.Terminal.plist"
/usr/libexec/PlistBuddy -c "Set :'Window Settings':Basic:Bell false" "$PLIST"
/usr/libexec/PlistBuddy -c "Set :'Window Settings':Basic:VisualBell false" "$PLIST"
/usr/libexec/PlistBuddy -c "Set :'Window Settings':Basic:columnCount 160" "$PLIST"
/usr/libexec/PlistBuddy -c "Set :'Window Settings':Basic:rowCount 40" "$PLIST"
/usr/libexec/PlistBuddy -c "Set :'Window Settings':Basic:FontAntialias true" "$PLIST"
/usr/libexec/PlistBuddy -c "Set :'Window Settings':Basic:FontWidthSpacing 1" "$PLIST"
/usr/libexec/PlistBuddy -c "Set :'Window Settings':Basic:FontHeightSpacing 1.5" "$PLIST"
/usr/libexec/PlistBuddy -c "Set :'Window Settings':Basic:shellExitAction 1" "$PLIST"
/usr/libexec/PlistBuddy -c "Set :'Window Settings':Basic:ShouldRestoreContent false" "$PLIST"
#########################################################################
# App Store
#########################################################################
# Disable video autoplay
defaults write com.apple.AppStore AutoPlayVideoSetting -string off
# Disable in-app ratings and reviews (broken on macOS Tahoe 26)
defaults write com.apple.AppStore InAppReviewEnabled -bool FALSE
#########################################################################
# Mail
#########################################################################
# Show only 2 lines of message preview
defaults write com.apple.mail NumberOfSnippetLines -int 2
# Compose messages in plain text
defaults write com.apple.mail AddLinkPreviews Plain
# Disable link previews
defaults write com.apple.mail AddLinkPreviews -bool FALSE
#########################################################################
# Close affected applications
#########################################################################
apps=(
"Finder"
"Dock"
"Spotlight"
"Siri"
"Safari"
"Terminal"
"App Store"
"Mail"
"System Settings"
)
for appname in "${apps[@]}"; do
killall -q "$appname" || true
done
echo "macOS configured successfully. Some settings require a reboot to take effect."
|