Repository navigation
Expand file tree
/
Copy pathmacos.sh
More file actions
executable file
·62 lines (46 loc) · 2.37 KB
/
Copy pathmacos.sh
File metadata and controls
executable file
·62 lines (46 loc) · 2.37 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh
set -eu
if [ "$(uname -s)" != "Darwin" ]; then
echo "macos.sh only supports macOS." >&2
exit 1
fi
version=$(sw_vers -productVersion)
echo "Applying conservative macOS preferences on macOS $version..."
# Appearance: use Dark Mode.
defaults write NSGlobalDomain AppleInterfaceStyle -string "Dark"
# Windows: fill the available space when a title bar is double-clicked.
defaults write NSGlobalDomain AppleActionOnDoubleClick -string "Fill"
# Finder: show all filename extensions.
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Finder: use list view and show the path bar and status bar.
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
defaults write com.apple.finder ShowPathbar -bool true
defaults write com.apple.finder ShowStatusBar -bool true
# Save screenshots as PNG files in ~/Screenshots.
defaults write com.apple.screencapture type -string "png"
defaults write com.apple.screencapture location -string "$HOME/Screenshots"
# Dock: position on the left and hide automatically.
defaults write com.apple.dock orientation -string "left"
defaults write com.apple.dock autohide -bool true
# Trackpad and mouse: use the traditional scroll direction.
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
# Trackpad: enable tap to click.
defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
# Menu bar clock: show the weekday and hide the date.
defaults write com.apple.menuextra.clock ShowDayOfWeek -bool true
defaults write com.apple.menuextra.clock ShowDate -int 0
# Terminal: use the built-in Clear Dark profile.
defaults write com.apple.Terminal "Default Window Settings" -string "Clear Dark"
defaults write com.apple.Terminal "Startup Window Settings" -string "Clear Dark"
# Ghostty: setting the default terminal app requires a one-time app action.
if [ -d "/Applications/Ghostty.app" ]; then
echo "Ghostty: choose Ghostty > Set Ghostty as Default Terminal App if needed."
fi
# Keyboard: free Command-Space for the Raycast global hotkey.
defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 64 \
'<dict><key>enabled</key><false/></dict>'
killall Finder >/dev/null 2>&1 || true
killall Dock >/dev/null 2>&1 || true
killall SystemUIServer >/dev/null 2>&1 || true
echo "macOS preferences applied. Some changes may require logging out."