forked from fredoliveira/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_once_mac-preferences.sh.tmpl
More file actions
223 lines (182 loc) · 7.75 KB
/
run_once_mac-preferences.sh.tmpl
File metadata and controls
223 lines (182 loc) · 7.75 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
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
#!/bin/sh
sudo scutil --set ComputerName {{ .computerName | quote }}
sudo scutil --set LocalHostName {{ .computerName | quote }}
# 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
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Trackpad: enable tap to click for this user and for the login screen
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
# Enable full keyboard access for all controls
# (e.g. enable Tab in modal dialogs)
#defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 15
# Set sidebar icon size to small
defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 1
# 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
###############################################################################
# Finder
###############################################################################
# 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
# 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 "clmv"
# Disable the warning before emptying the Trash
defaults write com.apple.finder WarnOnEmptyTrash -bool false
# Change Finder's default folder when opening new windows
defaults write com.apple.finder NewWindowTargetPath \
{{ joinPath .chezmoi.homeDir "Developer" | quote }}
# Change Finder's Column View text size to 12 and hide preview column
# - StandardViewOptions/ColumnViewOptions/FontSize 12
# - StandardViewOptions/ColumnViewOptions/ColumnShowIcons false
defaults write com.apple.finder StandardViewOptions -dict-add ColumnViewOptions \
'<dict>
<key>ArrangeBy</key>
<string>dnam</string>
<key>ColumnShowFolderArrow</key>
<true/>
<key>ShowPreview</key>
<true/>
<key>FontSize</key>
<integer>12</integer>
<key>SharedArrangeBy</key>
<string>kipl</string>
<key>ShowIconThumbnails</key>
<true/>
<key>ColumnShowIcons</key>
<false/>
<key>PreviewDisclosureState</key>
<true/>
<key>ColumnWidth</key>
<integer>245</integer>
</dict>'
# Change Finder's Desktop view settings
defaults write com.apple.finder DesktopViewSettings \
'<dict>
<key>GroupBy</key>
<string>Kind</string>
<key>IconViewSettings</key>
<dict>
<key>backgroundColorBlue</key>
<real>1</real>
<key>showIconPreview</key>
<true/>
<key>textSize</key>
<real>12</real>
<key>backgroundColorRed</key>
<real>1</real>
<key>backgroundType</key>
<integer>0</integer>
<key>backgroundColorGreen</key>
<real>1</real>
<key>gridOffsetX</key>
<real>0</real>
<key>gridOffsetY</key>
<real>0</real>
<key>showItemInfo</key>
<false/>
<key>viewOptionsVersion</key>
<integer>1</integer>
<key>labelOnBottom</key>
<false/>
<key>arrangeBy</key>
<string>dateAdded</string>
<key>iconSize</key>
<real>64</real>
<key>gridSpacing</key>
<integer>50</integer>
</dict>
</dict>'
# Show the ~/Library folder
chflags nohidden ~/Library
###############################################################################
# Dock, Dashboard, and hot corners #
###############################################################################
# Don’t show recent applications in Dock
defaults write com.apple.dock show-recents -bool false
# Change minimize/maximize window effect scale
defaults write com.apple.dock mineffect -string "scale"
# Hot corners
# Possible values:
# 0: no-op
# 2: Mission Control
# 3: Show application windows
# 4: Desktop
# 5: Start screen saver
# 6: Disable screen saver
# 7: Dashboard
# 10: Put display to sleep
# 11: Launchpad
# 12: Notification Center
# 13: Lock Screen
# 14: Quick Note
# Top right screen corner → Mission Control
defaults write com.apple.dock wvous-tr-corner -int 2
defaults write com.apple.dock wvous-tr-modifier -int 0
# Bottom right screen corner → Desktop
defaults write com.apple.dock wvous-br-corner -int 4
defaults write com.apple.dock wvous-br-modifier -int 0
###############################################################################
# Safari
###############################################################################
defaults write com.apple.Safari CanPromptForPushNotifications -bool false
defaults write com.apple.Safari ShowOverlayStatusBar -bool true
# Enable the Develop menu and the Web Inspector in Safari
defaults write com.apple.Safari IncludeDevelopMenu -bool true
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write com.apple.Safari WebKitPreferences.developerExtrasEnabled -bool true
# Add a context menu item for showing the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
###############################################################################
# Xcode
###############################################################################
# Automatically check spelling while typing
defaults write com.apple.dt.Xcode AutomaticallyCheckSpellingWhileTyping -bool true
# Trim trailing whitespace including whitespace-only lines
defaults write com.apple.dt.Xcode DVTTextEditorTrimTrailingWhitespace -bool true
defaults write com.apple.dt.Xcode DVTTextEditorTrimWhitespaceOnlyLines -bool true
# Jump to Definition with Command+click on Code
defaults write com.apple.dt.Xcode IDECommandClickOnCodeAction -int 1
# Enable Code structure when scrolling
defaults write com.apple.dt.Xcode DVTTextShowStructureHeaders -bool true
# Show Code folding ribbon
defaults write com.apple.dt.Xcode DVTTextShowFoldingSidebar -bool true
# Show Page guide at column 100
defaults write com.apple.dt.Xcode DVTTextShowPageGuide -bool true
defaults write com.apple.dt.Xcode DVTTextPageGuideLocation -int 100
# Align consecutive // comments
defaults write com.apple.dt.Xcode DVTTextAlignConsecutiveSlashSlashComments -bool true
# Hide Minimap
defaults write com.apple.dt.Xcode DVTTextShowMinimap -bool false
# Show Build Time in the toolbar
defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES
###############################################################################
# Music
###############################################################################
# Download Dolby Atmos
defaults write com.apple.Music downloadDoblyAtmos -bool true
# Disable notifications when song changes
defaults write com.apple.Music userWantsPlaybackNotifications -bool false
###############################################################################
# Manual preferences
###############################################################################
# Things that must be done manually
# Reduce Slack UI font
# Slack > Preferences > Accessibility > Zoom 90%
# Install 'CSSEdit Tribute.xccolortheme'
# TODO