Skip to content

Instantly share code, notes, and snippets.

@midzdotdev
Last active June 23, 2022 13:38
Show Gist options
  • Save midzdotdev/34247844adc6c103612342bc94cbecf7 to your computer and use it in GitHub Desktop.
Save midzdotdev/34247844adc6c103612342bc94cbecf7 to your computer and use it in GitHub Desktop.
Useful macOS commands run from the terminal
  • All apps run without security warning: sudo spctl --master-disable
  • Disable SIP: csrutil disable (from recovery - ⌘R at boot)

Single App Mode

Back in 1999, Mac OS X ran in Single App Mode. In this state, opening an app minimizes the current one - and you can still make macOS behave that way today.

  • Enable: defaults write com.apple.dock single-app -bool true;killall Dock
  • Disable: defaults write com.apple.dock single-app -bool no;killall Dock

Charging Sound

The new-ish super slim 12-inch 2015 MacBook was the first of it's kind to make a chime when being plugged in. It's possible to have this on any MacBook with the command below.

  • Enable: defaults write com.apple.PowerChime ChimeOnAllHardware -bool true; open /System/Library/CoreServices/PowerChime.app &
  • Disable: defaults write com.apple.PowerChime ChimeOnAllHardware -bool false;killall PowerChime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment