-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmacos.sh
executable file
·70 lines (51 loc) · 2.26 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/env bash
# ~/.macos — https://mths.be/macos
# Turn off gatekeeper
sudo spctl --master-disable
# Set standby delay to 24 hours (default is 1 hour)
sudo pmset -a standbydelay 86400
# Disable the sound effects on boot
sudo nvram SystemAudioVolume=" "
# Save to disk (not to iCloud) by default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Disable Resume system-wide
defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false
# Disable automatic termination of inactive apps
defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
# Restart automatically if the computer freezes
systemsetup -setrestartfreeze on
# Check for software updates daily, not just once per week
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
# Disable the “Reopen windows when logging back in” checkbox in dialog
defaults write com.apple.loginwindow LoginwindowLaunchesRelaunchApps -bool false
# Enable full keyboard access for all controls
# (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Disable press-and-hold for keys in favor of key repeat
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 10
# Use list view in all Finder windows by default
# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
# Stop iTunes from responding to the keyboard media keys
# Removed as it messes with Spotify too
#launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null
# Setup app preferences
./.app/.activitymonitor
./.app/.dock
./.app/.finder
./.app/.itunes
./.app/.mail
./.app/.timemachine
./.app/.transmission
./.app/.terminal
# Kill affected applications
for app in "Dock" "Finder" "Terminal" "Transmission"; do
killall "$app" > /dev/null 2>&1
done