-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmac_setup.sh
executable file
·93 lines (78 loc) · 4 KB
/
mac_setup.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
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
#!/bin/bash
# Source utility functions
source ./scripts/utils.sh
# Set macOS preferences
step "Customizing macOS system preferences..."
# Keyboard settings
step "Setting faster keyboard repeat rates..."
defaults write -g InitialKeyRepeat -int 10 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)
print_success_muted "Keyboard repeat rates configured"
# Finder preferences
step "Showing hidden files and file extensions in Finder..."
defaults write com.apple.finder AppleShowAllFiles YES
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
defaults write com.apple.finder ShowPathbar -bool true
defaults write com.apple.finder ShowStatusBar -bool true
defaults write com.apple.finder _FXSortFoldersFirst -bool true
print_success_muted "Finder preferences configured"
# System preferences
step "Enabling tap-to-click and removing app security warnings..."
defaults write com.apple.LaunchServices LSQuarantine -bool false
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
print_success_muted "System preferences configured"
# Text and input preferences
step "Disabling automatic text corrections and substitutions..."
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
print_success_muted "Text input preferences configured"
# Save and print dialogs
step "Expanding save and print dialogs by default..."
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
print_success_muted "Save and print dialogs configured"
# Screenshot settings
step "Setting PNG as default screenshot format..."
defaults write com.apple.screencapture type -string "png"
defaults write com.apple.screencapture "include-date" -bool "true"
print_success_muted "Screenshot settings configured"
# .DS_Store settings
step "Preventing .DS_Store file creation on network and USB volumes..."
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
print_success_muted ".DS_Store settings configured"
# Show Library folder
step "Making Library folder visible in home directory..."
chflags nohidden ~/Library
print_success_muted "Library folder made visible"
# Dock settings
step "Removing Dock animation delays and clearing default apps..."
defaults write com.apple.Dock autohide-delay -float 0
defaults write com.apple.dock autohide-time-modifier -float 0
defaults write com.apple.dock expose-animation-duration -float 0
defaults write com.apple.dock springboard-show-duration -int 0
defaults write com.apple.dock springboard-hide-duration -int 0
defaults write com.apple.dock springboard-page-duration -int 0
defaults write com.apple.dock persistent-apps -array
print_success_muted "Dock preferences configured"
# iCloud default save
step "Setting default save location to local disk instead of iCloud..."
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
print_success_muted "Default save location configured"
# Disable Apple Intelligence
step "Disabling Apple Intelligence..."
defaults write com.apple.CloudSubscriptionFeatures.optIn "545129924" -bool "false"
print_success_muted "Apple Intelligence disabled"
# Restart affected applications
step "Applying changes by restarting Finder and Dock..."
killall Dock
killall Finder
print_success_muted "Applications restarted"
echo ""
print_success "macOS settings have been updated successfully!"