Skip to content

macOS

Dark Theme for Menubar and Dock but overall Light Theme.

  1. System Preferences, then set the theme to LIGHT, then run
  2. defaults write -g NSRequiresAquaSystemAppearance -bool Yes
  3. 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 Location

defaults write com.apple.screencapture location <custom-folder-location>

Quit Printer App After Print Jobs Complete

defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true

Finder

Stop ds_store creation on shared network drives

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

Reset

defaults write com.apple.desktopservices DSDontWriteNetworkStores false

Dock

Disable Dock Auto Hide Animation

defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock

Reset

defaults delete com.apple.dock autohide-time-modifier;killall Dock

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

Block Websites

  1. sudo nano /etc/hosts
  2. Add 0.0.0.0 siteToBlock.com
  3. Save > Exit (CTRL + x > y)

Apple Silicon Macs: ON on opening lid or connect to power

To prevent startup when opening the lid or connecting to power

sudo nvram BootPreference=%00

To prevent startup only when opening the lid

sudo nvram BootPreference=%01

To prevent startup only when connecting to power

sudo nvram BootPreference=%02

Reset the behavior to defaults

sudo nvram -d BootPreference

References