-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.macos
More file actions
executable file
·74 lines (60 loc) · 3.24 KB
/
.macos
File metadata and controls
executable file
·74 lines (60 loc) · 3.24 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
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env bash
# Close System Settings to prevent overriding
osascript -e 'tell application "System Settings" to quit'
# Ask for admin password upfront
sudo -v
# Keep sudo alive
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# General
sudo nvram SystemAudioVolume=" " # Disable boot sound
# Trackpad
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
# Bottom right corner = right-click
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2
defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1
# Disable natural scrolling
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
# Keyboard
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false # Disable press-and-hold
defaults write NSGlobalDomain KeyRepeat -int 2 # Fast key repeat
defaults write NSGlobalDomain InitialKeyRepeat -int 15
# Power
sudo pmset -a lidwake 1
# Screen
defaults write com.apple.screensaver askForPassword -int 1 # Require password after sleep
defaults write com.apple.screensaver askForPasswordDelay -int 0
defaults write NSGlobalDomain AppleFontSmoothing -int 1 # Subpixel font rendering
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true # HiDPI
# Finder
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowMountedServersOnDesktop -bool false
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool false
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
defaults write com.apple.finder ShowStatusBar -bool true
defaults write com.apple.finder ShowPathbar -bool true
defaults write com.apple.finder _FXSortFoldersFirst -bool true
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" # Search current folder
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
defaults write NSGlobalDomain com.apple.springing.enabled -bool true
defaults write NSGlobalDomain com.apple.springing.delay -float 0
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" # List view
# Dock
defaults write com.apple.dock autohide-delay -int 0
defaults write com.apple.dock autohide-time-modifier -float 0.8
defaults write com.apple.dock tilesize -int 64
defaults write com.apple.dock mru-spaces -bool false # Don't rearrange spaces
defaults write com.apple.dock autohide -bool true
defaults write com.apple.dock show-recents -bool false
defaults write com.apple.dock persistent-apps -array # Clear dock icons
# Menu bar
defaults -currentHost write com.apple.Spotlight MenuItemHidden -int 1
defaults write com.apple.controlcenter.plist BatteryShowPercentage -bool true
# Restart affected apps
for app in "Activity Monitor" "Dock" "Finder" "SystemUIServer"; do
killall "${app}"
done