--- some tricks for macos
To exit Finder using cmd+Q use this command
defaults write com.apple.finder QuitMenuItem -bool YES && killall Finder
This won't remove it from dock though.
To Revert
defaults write com.apple.finder QuitMenuItem -bool NO && killall Finder
Additional Finder tweaks
# Show full path in Finder title bar
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true && killall Finder
# Always show all file extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Disable warning when changing file extensions
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Prevent .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Disable reopening windows on restart
defaults write com.apple.loginwindow TALLogoutSavesState -bool false
Screensaver tricks.
# Change screenshot location
mkdir -p ~/Screenshots
defaults write com.apple.screencapture location ~/Screenshots && killall SystemUIServer
# Save screenshots as PNG
defaults write com.apple.screencapture type -string "png" && killall SystemUIServer
Disable MacBook typing autocorrects and text replacements. You need to restart system for them to take effects.
# Disable automatic spelling correction (autocorrect)
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# Disable smart quotes (curly quotes)
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
# Disable smart dashes (en/em dashes)
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
# Disable automatic capitalization
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
# Disable automatic period substitution (double-space → .)
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
Text Replacement is an array. To disable it, set it to empty.
# Disable text replacement shortcuts
defaults write NSGlobalDomain NSUserDictionaryReplacementItems -array
To enable it, assign replacement array
defaults write NSGlobalDomain NSUserDictionaryReplacementItems -array \
'{ on = "omw"; replace = "On my way!"; }' \
'{ on = "macbook"; replace = "MacBook"; }'