MacOS defaults Functions - mvaltas/grind GitHub Wiki

The MacOS defaults is a set of shortcuts for interacting with defaults in MacOS which sets preferences values.

Usage

At your definition file start by requiring macos-defaults like so:

use "macos-defaults"

Functions

defaults DOMAIN KEY VALUE

Calling defaults always need a DOMAIN a KEY and a VALUE. The global domain can be passed as -g. Before running the write the API will assess using default read if VALUE is already set.

use "macos-defaults"

# enable Dock auto-hiding
defaults com.apple.dock autohide 1

# Full Access Keyboard
defaults -g AppleKeyboardUIMode 2

# Enable bluetooth mouse right click
defaults com.apple.driver.AppleBluetoothMultitouch.mouse MouseButtonMode TwoButton