-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.macos
47 lines (32 loc) · 1.78 KB
/
.macos
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
#!/bin/bash
# Inspired by:
# ~/.macos — https://mths.be/macos
# Close open System Preferences panes to prevent them from overriding settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# Set language and text formats
defaults write NSGlobalDomain AppleLanguages -array "en" "zh-Hant"
# Save screenshots to ~/Documents/Screenshots
defaults write com.apple.screencapture location -string "${HOME}/Documents/Screenshots"
# Set the default location for new Finder windows
# For Desktop, use `PfDe` and `file://${HOME}/Desktop/`
defaults write com.apple.finder NewWindowTarget -string "PfLo"
defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/"
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Set the default view for all Finder windows
# Four-letter codes for view modes: `icnv` (icon), `Nlsv` (list), `clmv` (column)
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
# Set the icon size of Dock items
defaults write com.apple.dock tilesize -int 40
# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true
# Don’t show recent applications in Dock
defaults write com.apple.dock show-recents -bool false
# Prevent Time Machine from prompting to use new hard drives as backup volume
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
# Prevent Photos from opening automatically when devices are plugged in
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true