Skip to content

Instantly share code, notes, and snippets.

@jorgerance
Last active March 5, 2024 10:37
Show Gist options
  • Save jorgerance/4950b6663b32f745cdedf00126186fa4 to your computer and use it in GitHub Desktop.
Save jorgerance/4950b6663b32f745cdedf00126186fa4 to your computer and use it in GitHub Desktop.
[macOS system defaults]

Drag Dashboard Widgets onto the Desktop

defaults write com.apple.dashboard devmode YES

Disable Auto-window-restore annoying feature

This is actually a pain in the as since has to be done for each application.

i.e.: Telegram:

defaults write com.tdesktop.Telegram NSQuitAlwaysKeepsWindows -bool false

Your can actually list all applications by running defaults domains or look for a specific bundle name by using this nasty, but useful, oneliner:

0 ✓ steve@hal9000 ~ $ function findbundle() { defaults find $1 | awk -F '"bundle-identifier" = "' '{print $2}' | tr -d '";' | grep -i $1 ; }
0 ✓ steve@hal9000 ~ $ findbundle iterm
com.googlecode.iterm2
0 ✓ steve@hal9000 ~ $

Show hidden files in Finder

defaults write com.apple.finder AppleShowAllFiles TRUE

Or simply use Shift+Command+. on Finder.

Kill the entire desktop gui

This one may be usefull when facing RAM issues:

defaults write com.apple.dashboard mcx-disabled -boolean YES; killall Dock

Turn off “Application Downloaded from Internet” warning

defaults write com.apple.LaunchServices LSQuarantine -bool NO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment