-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmacos-defaults.sh
More file actions
executable file
·48 lines (37 loc) · 2.04 KB
/
macos-defaults.sh
File metadata and controls
executable file
·48 lines (37 loc) · 2.04 KB
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
#!/bin/bash
# macOS system preferences — requires logout to take full effect.
# 1. Function keys act as standard function keys (not media keys)
defaults write -g com.apple.keyboard.fnState -bool true
# 2. Globe key: show emoji & symbols picker
# GlobeKeyAction is a legacy mirror; the system reads AppleFnUsageType via TIS API
# Values: 0=Do Nothing, 1=Dictation, 2=Change Input Source, 3=Show Emoji & Symbols
defaults write NSGlobalDomain GlobeKeyAction -int 3
defaults write com.apple.HIToolbox AppleFnUsageType -int 3
# 3. Fast key repeat rate
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 15
# 3. Finder: use list view by default
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
# 4. Trackpad: tap to click
defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
# 5. Trackpad: two-finger tap as right click
defaults write com.apple.AppleMultitouchTrackpad TrackpadRightClick -bool true
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
# 6. Dock: auto-hide and small size
defaults write com.apple.dock autohide -bool true
defaults write com.apple.dock tilesize -int 36
# 7. Require password immediately after screensaver starts
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
# 8. Hot corner: bottom-left activates screen saver
# wvous-bl-corner = 5 (screen saver), wvous-bl-modifier = 0 (no modifier key)
defaults write com.apple.dock wvous-bl-corner -int 5
defaults write com.apple.dock wvous-bl-modifier -int 0
# Restart affected apps
killall Finder 2>/dev/null
killall Dock 2>/dev/null
killall TextInputSwitcher 2>/dev/null # flush globe key action cache
echo "Done. Log out and back in for all settings to take effect."