-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.macos
210 lines (141 loc) · 7.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
#!/usr/bin/env bash
sudo -v
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# ui/ux
# Auto hide menu bar
defaults write NSGlobalDomain _HIHideMenuBar -bool true
# set standby delay to 24 hours (default is 1 hour)
sudo pmset -a standbydelay 86400
# set Finder's sidebar icon size to small
defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 1
# show scrollbars only when scrolling
defaults write NSGlobalDomain AppleShowScrollBars -string "WhenScrolling"
# Possible values: `WhenScrolling`, `Automatic` and `Always`
# expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -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 automatic termination of inactive apps
# defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
# disable the crash reporter
# defaults write com.apple.CrashReporter DialogType -string "none"
# 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
# disable Notification Center and remove the menu bar icon
# launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null
# enable spring loading for directories
defaults write NSGlobalDomain com.apple.springing.enabled -bool true
# remove the spring loading delay for directories
defaults write NSGlobalDomain com.apple.springing.delay -float 0
# typing
# 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
# keyboard
# disable press-and-hold for keys in favor of key repeat
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 15
# defaults write NSGlobalDomain KeyRepeat -int 5
# defaults write NSGlobalDomain InitialKeyRepeat -int 15
# disable MacVim <Ctrl-Click> menu
defaults write org.vim.MacVim MMTranslateCtrlClick 0
# disable MacVim Title Bar
defaults write org.vim.MacVim MMNoTitleBarWindow true
# https://github.com/macvim-dev/macvim/wiki/FAQ
# defaults write org.vim.MacVim MMUseCGLayerAlways -bool YES
# stop iTunes from responding to the keyboard media keys
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null
# screen
# require password immediately after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
# save screenshots to the desktop
defaults write com.apple.screencapture location -string "${HOME}/Desktop"
# save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "png"
# disable shadow in screenshots
# defaults write com.apple.screencapture disable-shadow -bool true
# enable subpixel font rendering on non-Apple LCDs
# reference: https://github.com/kevinSuttle/macOS-Defaults/issues/17#issuecomment-266633501
defaults write NSGlobalDomain AppleFontSmoothing -int 1
# Finder
# hide Desktop icons
# defaults write com.apple.finder CreateDesktop false
# allow quitting via ⌘ + Q; doing so will also hide desktop icons
defaults write com.apple.finder QuitMenuItem -bool true
# show hidden files by default
# defaults write com.apple.finder AppleShowAllFiles -bool true
# show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# hide status bar
defaults write com.apple.finder ShowStatusBar -bool false
# hide path bar
defaults write com.apple.finder ShowPathbar -bool false
# display full POSIX path as Finder window title
defaults write com.apple.finder _FXShowPosixPathInTitle -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 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
# use list view in all Finder windows by default
# four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
# show the ~/Library folder
chflags nohidden ~/Library
# Show the /Volumes folder
sudo chflags nohidden /Volumes
# Dock
# set the icon size of Dock items to 42 pixels
defaults write com.apple.dock tilesize -int 42
# enable spring loading for all Dock items
defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true
# show indicator lights for open applications in the Dock
defaults write com.apple.dock show-process-indicators -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
# make Dock icons of hidden applications translucent
# defaults write com.apple.dock showhidden -bool true
# wipe all (default) app icons from the Dock
# this is only really useful when setting up a new Mac, or if you don’t use
# the Dock to launch apps.
# defaults write com.apple.dock persistent-apps -array
# Dashboard
# disable Dashboard
defaults write com.apple.dashboard mcx-disabled -bool true
# don’t show Dashboard as a Space
defaults write com.apple.dock dashboard-in-overlay -bool true
# don’t automatically rearrange Spaces based on most recent use
defaults write com.apple.dock mru-spaces -bool false
# Launchpad
# disable the Launchpad gesture (pinch with thumb and three fingers)
defaults write com.apple.dock showLaunchpadGestureEnabled -int 0
# iTerm2
# Don’t display the annoying prompt when quitting iTerm
defaults write com.googlecode.iterm2 PromptOnQuit -bool false
# Google Chrome
# Use the system-native print preview dialog
defaults write com.google.Chrome DisablePrintPreview -bool true
defaults write com.google.Chrome.canary DisablePrintPreview -bool true