macOS
User Interface
Dark Theme for Menubar and Dock but overall Light Theme.
- System Preferences, then set the theme to LIGHT, then run
defaults write -g NSRequiresAquaSystemAppearance -bool Yes
- Logout, then System Preferences, then set the theme to DARK.
Reset back to the default theme.defaults write -g NSRequiresAquaSystemAppearance -bool No
Expand Print Panel by Default
defaults write -g PMPrintingExpandedStateForPrint -bool true && \
defaults write -g PMPrintingExpandedStateForPrint2 -bool true
Screenshots Locationdefaults write com.apple.screencapture location <custom-folder-location>
Quit Printer App After Print Jobs Completedefaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
Finder
Stop ds_store creation on shared network drivesdefaults write com.apple.desktopservices DSDontWriteNetworkStores true
Revert back to defaultdefaults write com.apple.desktopservices DSDontWriteNetworkStores false
Dock
Disable Dock Auto Hide Animationdefaults write com.apple.dock autohide-time-modifier -int 0;killall Dock
Reset Back to Defaultdefaults delete com.apple.dock autohide-time-modifier;killall Dock
Menu
Clean up the "Open With" Menu
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
Misc
Flush DNS Cache
sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper; sudo dscacheutil -flushcache
Turn off ‘Microsoft AutoUpdate’
check statuslaunchctl print-disabled gui/$(id -u) | grep microsoft
disable the servicelaunchctl disable gui/$(id -u)/com.microsoft.update.agent
Block Websites
sudo nano /etc/hosts
- Add
0.0.0.0 siteToBlock.com
- Save > Exit (CTRL + x > y)
References
- Mac keyboard shortcuts
- Awesome macOS Command Line (archive)
- [Solving Trash Problems](http://www.thexlab.com/faqs/trash.html#Anchor-Trash-33869