-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_once_after_90-configure-darwin.sh.tmpl
110 lines (81 loc) · 3.25 KB
/
run_once_after_90-configure-darwin.sh.tmpl
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
{{ if (eq .chezmoi.os "darwin") -}}
#!/bin/bash
set -eufo pipefail
ln -sfn ~/Library/Mobile\ Documents/com~apple~CloudDocs/ ~/icloud
defaults write com.apple.finder AppleShowAllFiles true
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
defaults write com.apple.menuextra.battery ShowPercent -bool true
# disable natural scrolling
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
# 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
# Disable smart quotes as they’re annoying when typing code
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
# 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 10
# Show the main window when launching Activity Monitor
defaults write com.apple.ActivityMonitor OpenMainWindow -bool true
# Visualize CPU usage in the Activity Monitor Dock icon
defaults write com.apple.ActivityMonitor IconType -int 5
# Show all processes in Activity Monitor
defaults write com.apple.ActivityMonitor ShowCategory -int 0
# Sort Activity Monitor results by CPU usage
defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage"
defaults write com.apple.ActivityMonitor SortDirection -int 0
# Show the ~/Library folder
chflags nohidden ~/Library
# Show the /Volumes folder
sudo chflags nohidden /Volumes
defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false
defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -bool false
# https://github.com/twpayne/dotfiles/blob/master/run_once_after_90-configure-darwin.sh.tmpl
# https://github.com/mathiasbynens/dotfiles/blob/main/.macos
# https://github.com/mathiasbynens/dotfiles/blob/main/.macos#L436
# top right Mission Control
defaults write com.apple.dock wvous-tr-corner -int 2
defaults write com.apple.dock wvous-tr-modifier -int 0
# top left App windows
defaults write com.apple.dock wvous-tl-corner -int 3
defaults write com.apple.dock wvous-tl-modifier -int 0
# bottom right screensaver
defaults write com.apple.dock wvous-br-corner -int 5
defaults write com.apple.dock wvous-br-modifier -int 0
# bottom right n/a
defaults write com.apple.dock wvous-bl-corner -int 0
defaults write com.apple.dock wvous-bl-modifier -int 0
# Remove the auto-hiding Dock delay
defaults write com.apple.dock autohide-delay -float 0.2
# Remove the animation when hiding/showing the Dock
defaults write com.apple.dock autohide-time-modifier -float 0.2
# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true
for dockItemLabel in \
Launchpad \
Safari \
Mail \
FaceTime \
Messages \
Maps \
Photos \
Contacts \
Calendar \
Reminders \
Notes \
Music \
Podcasts \
TV \
News \
Numbers \
Keynote \
Pages \
"App Store" \
"System Preferences" ; do
dockutil --find "$dockItemLabel" >/dev/null && dockutil --no-restart --remove "$dockItemLabel"
done
killall Dock
{{ end -}}