-
Notifications
You must be signed in to change notification settings - Fork 4
/
settings_defaults.sh
111 lines (90 loc) · 3.42 KB
/
settings_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
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
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# SETTINGS
ask "Adjust Keyboard settings"
if [ "$RESPONSE" = true ]; then
defaults write -g KeyRepeat -int 2 # normal minimum is 2 (30 ms)
defaults write -g InitialKeyRepeat -int 15 # normal minimum is 15 (225 ms)
fi
ask "Make scroll direction non-natural"
if [ "$RESPONSE" = true ]; then
defaults write -g com.apple.swipescrolldirection -bool false
fi
ask "Mouse Right-Click"
if [ "$RESPONSE" = true ]; then
defaults write com.apple.driver.AppleBluetoothMultitouch.mouse MouseButtonMode TwoButton
fi
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# DOCK
ask "Activate Dock Auto Hide"
if [ "$RESPONSE" = true ]; then
defaults write com.apple.dock autohide -float 1
fi
ask "Reduce Dock Auto Hide Animation"
if [ "$RESPONSE" = true ]; then
defaults write com.apple.dock autohide-time-modifier -float 0.25
fi
ask "Remove Dock Delay for Auto Hide & Auto-Show"
if [ "$RESPONSE" = true ]; then
defaults write com.apple.dock autohide-delay -float 0
fi
ask "Change minimize/maximize window effect"
if [ "$RESPONSE" = true ]; then
defaults write com.apple.dock mineffect -string "scale"
fi
ask "Don’t automatically rearrange Spaces based on most recent use"
if [ "$RESPONSE" = true ]; then
defaults write com.apple.dock mru-spaces -bool false
fi
ask "Set the icon size of Dock items to 63 pixels"
defaults write com.apple.dock tilesize -int 63
killall Dock
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# FINDER
ask "Show the ~/Library folder"
if [ "$RESPONSE" = true ]; then
chflags nohidden ~/Library
fi
ask "Show the /Volumes folder"
if [ "$RESPONSE" = true ]; then
sudo chflags nohidden /Volumes
fi
ask "When performing a search, search the current folder by default"
if [ "$RESPONSE" = true ]; then
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
fi
ask "Use list view in all Finder windows "
# Four-letter codes for the other view modes: `icnv`, `clmv`, `glyv`
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
ask "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
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# OTHER
ask "Create iCloud shortcut"
if [ "$RESPONSE" = true ]; then
ln -s "${ICLOUD_HOME_PATH}" ~/iCloud
fi
ask "Disable local Time Machine backups"
if [ "$RESPONSE" = true ]; then
hash tmutil &> /dev/null && sudo tmutil disablelocal
fi
ask "Disable auto-correct"
if [ "$RESPONSE" = true ]; then
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
fi
ask "Set a fast keyboard repeat rate"
if [ "$RESPONSE" = true ]; then
defaults write NSGlobalDomain KeyRepeat -int 2
fi
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# TEXTEDIT
ask "Use plain text mode for new TextEdit documents"
defaults write com.apple.TextEdit RichText -int 0
ask "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
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# ENERGY SAVING
sudo pmset -a displaysleep 15