Skip to content

Commit 6582649

Browse files
committed
Add macos-setup script
1 parent 523c5fe commit 6582649

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

bin/macos-setup

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
echo "Configuring macOS defaults..."
5+
6+
# Disable natural scrolling (old-style scroll direction)
7+
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
8+
9+
# Key repeat: fastest rate, shortest delay
10+
defaults write NSGlobalDomain KeyRepeat -int 1
11+
defaults write NSGlobalDomain InitialKeyRepeat -int 10
12+
13+
# Disable press-and-hold for diacritic selector (enables key repeat everywhere)
14+
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
15+
16+
# Turn off dictation
17+
defaults write com.apple.HIToolbox AppleDictationAutoEnable -int 0
18+
19+
# Dark mode
20+
defaults write NSGlobalDomain AppleInterfaceStyle -string "Dark"
21+
22+
# Disable sticky keys
23+
defaults write com.apple.universalaccess stickyKey -bool false
24+
25+
# Show all file extensions in Finder
26+
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
27+
28+
# Full keyboard access (tab through all UI controls)
29+
defaults write NSGlobalDomain AppleKeyboardUIMode -int 2
30+
31+
# Dock: auto-hide
32+
defaults write com.apple.dock autohide -bool true
33+
34+
# Don't rearrange Spaces based on most recent use
35+
defaults write com.apple.dock mru-spaces -bool false
36+
37+
# Turn off dictation auto-enable
38+
defaults write com.apple.HIToolbox AppleDictationAutoEnable -int 0
39+
40+
echo "Done. Some changes require a logout or restart to take effect."

install.zsh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ if [ -e "$HOME/Library" ]; then
132132
echo "⌨ Adding extra keybindings to macOS..."
133133
mkdir -p "$HOME/Library/KeyBindings"
134134
symlink "$basedir/DefaultKeyBinding.dict" "$HOME/Library/KeyBindings/DefaultKeyBinding.dict"
135+
136+
echo "⚙ Applying macOS defaults..."
137+
"$basedir/bin/macos-setup"
135138
fi
136139

137140
echo "◉ Setting up git..."

0 commit comments

Comments
 (0)