-
Notifications
You must be signed in to change notification settings - Fork 7
/
osx-defaults.sh
executable file
·51 lines (39 loc) · 2.05 KB
/
osx-defaults.sh
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
#!/bin/sh -eux
which defaults || {
echo 'must run on a mac, /usr/bin/defaults not in your $PATH'
exit 1
}
# menu bar: opaque
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# dock
# pin in corner
defaults write com.apple.dock pinning -string start
# make icons of hidden applications translucent
defaults write com.apple.dock showhidden -bool true
killall Dock
# my keyboard shortcuts
# http://hints.macworld.com/article.php?story=20131123074223584
# @ for Command, $ for Shift, ~ for Alt and ^ for Ctrl
# global shortcuts
defaults write -g NSUserKeyEquivalents -dict-add 'Zoom' -string '@/'
defaults write -g NSUserKeyEquivalents -dict-add 'Hide Sidebar' -string '@~`'
defaults write -g NSUserKeyEquivalents -dict-add 'Show Sidebar' -string '@~`'
# app shortcuts
defaults write com.apple.Terminal NSUserKeyEquivalents -dict-add 'Return to Default Size' -string '@~/'
defaults write com.apple.Mail NSUserKeyEquivalents -dict-add 'Hide Mailbox List' -string '@~`'
defaults write com.apple.Mail NSUserKeyEquivalents -dict-add 'Show Mailbox List' -string '@~`'
defaults write com.apple.AddressBook NSUserKeyEquivalents -dict-add 'Hide Groups' -string '@~`'
defaults write com.apple.AddressBook NSUserKeyEquivalents -dict-add 'Show Groups' -string '@~`'
defaults write com.apple.Finder NSUserKeyEquivalents -dict-add 'Hide Sidebar' -string '@~`'
defaults write com.apple.Finder NSUserKeyEquivalents -dict-add 'Show Sidebar' -string '@~`'
# Enable full keyboard access for all controls
# (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Terminal.app
# TODO: read defaults to see if these window and group settings are loaded in
# Terminal.app, and if needed, `open ./terminal/Iy*`
# defaults write com.apple.Terminal SecureKeyboardEntry 1
# defaults write com.apple.Terminal 'Default Window Settings' 'IyAir'
# defaults write com.apple.Terminal 'Startup Window Settings' 'IyAir'
# defaults write com.apple.Terminal 'Startup Window Group' 'IyAir2xRHS'
# defaults write com.apple.Terminal StartupAction 2