-
Notifications
You must be signed in to change notification settings - Fork 20
/
macos_defaults.sh
executable file
·86 lines (71 loc) · 2.27 KB
/
macos_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
#!/usr/bin/env bash
set -eo pipefail
usage() {
cat << EOF
usage: $0
OPTIONS:
-d Set debug mode
-h Show this message
EOF
}
while getopts "hd" OPTION
do
case $OPTION in
d)
set -x
;;
h)
usage
exit 0
;;
?)
usage
exit 1
;;
esac
done
# TODO list
# - Turn off all prediction and autocorrect when typing (Accessibility -> zoom -> use scroll gesture with keyboard shortcut)
# - Enable zoom with keyboard shortcut (keyboard -> Text input -> input sources -> edit)
# - Trackpad tap to click (trackpad -> point & click -> tap to click)
# - Trackpad secondary click with two fingers (trackpad -> point & click -> secondary click)
# Turn off natural scrolling
defaults write -g com.apple.swipescrolldirection -bool false
# Speed up key repeats
defaults write -g InitialKeyRepeat -int 25
defaults write -g KeyRepeat -int 2
# Disable popup menu when holding down key
defaults write -g "ApplePressAndHoldEnabled" -bool "false"
# Expand save panel by default
defaults write -g NSNavPanelExpandedStateForSaveMode -bool true
# Expand print panel by default
defaults write -g PMPrintingExpandedStateForPrint -bool true
# Disable the "Are you sure you want to open this application?" dialog. Yes I am sure.
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Finder in column mode by default
defaults write com.apple.finder "FXPreferredViewStyle" -string "clmv"
# Don't warn when changing file suffix
defaults write com.apple.finder "FXEnableExtensionChangeWarning" -bool "false"
# Make the dock smaller and hide it
defaults write com.apple.dock "tilesize" -int "36"
defaults write com.apple.dock "autohide" -bool "true"
# Set the screenshots dir to a folder on the desktop
if [ ! -d "$HOME/Desktop/screenshots" ]; then
mkdir "$HOME"/Desktop/screenshots
fi
defaults write com.apple.screencapture "location" -string "~/Desktop/screenshots"
# Don't show the thumbnail after taking it
defaults write com.apple.screencapture "show-thumbnail" -bool "false"
# Set the regional time / data settings
# TODO: this doesn't work
# defaults write -g AppleFirstWeekday "{ gregorian = 2; }"
# Kill affected applications
APPS=(
SystemUIServer
Finder
Dock
Calendar
)
for APP in "${APPS[@]}"; do
killall "$APP" &>/dev/null || true
done