-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathmacos.sh
executable file
·54 lines (40 loc) · 1.88 KB
/
macos.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
#!/bin/bash
# Exit on error
set -e
echo "⚙️ Closing System Preferences..."
osascript -e 'tell application "System Preferences" to quit'
echo "⌨️ Configuring Keyboard settings..."
# Disable press-and-hold for keys in favor of key repeat
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Set faster keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 10
echo "🚀 Configuring Dock settings..."
# Auto-hide the Dock
defaults write com.apple.dock autohide -bool true
echo "📁 Configuring Finder settings..."
# Show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Show hidden files by default
defaults write com.apple.finder AppleShowAllFiles -bool true
# Show path bar in Finder
defaults write com.apple.finder ShowPathbar -bool true
# Show status bar in Finder
defaults write com.apple.finder ShowStatusBar -bool true
echo "🖥️ Configuring Desktop settings..."
# Show hard drives on desktop
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
echo "🖱️ Configuring Trackpad settings..."
# Enable tap to click
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true
# Disable "natural" scrolling. Down for down and up for up
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
echo "🔄 Restarting affected applications..."
for app in "Dock" "Finder" "SystemUIServer"; do
killall "${app}" >/dev/null 2>&1
done
echo "✨ MacOS settings updated successfully. Some changes may require a restart to take effect."