Battery
Everything under System Settings › Battery, as Nix options. Each one is named after the control
you'd click, and set under programs.nix-plist-manager.options in nix-darwin.
Energy Mode
Section titled “Energy Mode”On battery
Section titled “On battery”System Settings › Battery › Energy Mode › On battery
applications.systemSettings.battery.energyMode.onBattery = "Automatic"; One of: "Automatic""High Power""Low Power"
Where it's stored and what runs
-
/Library/Preferences/com.apple.PowerManagementBattery Power
For Automatic:
/usr/bin/pmset -b powermode 0For High Power:
/usr/bin/pmset -b powermode 2For Low Power:
/usr/bin/pmset -b powermode 1On power adapter
Section titled “On power adapter”System Settings › Battery › Energy Mode › On power adapter
applications.systemSettings.battery.energyMode.onPowerAdapter = "Automatic"; One of: "Automatic""High Power""Low Power"
Where it's stored and what runs
-
/Library/Preferences/com.apple.PowerManagementAC Power
For Automatic:
/usr/bin/pmset -c powermode 0For High Power:
/usr/bin/pmset -c powermode 2For Low Power:
/usr/bin/pmset -c powermode 1Options…
Section titled “Options…”Prevent automatic sleeping on power adapter when the display is off
Section titled “Prevent automatic sleeping on power adapter when the display is off”System Settings › Battery › Options… › Prevent automatic sleeping on power adapter when the display is off
applications.systemSettings.battery.options.preventAutomaticSleepingOnPowerAdapterWhenTheDisplayIsOff = true; true or false
Where it's stored and what runs
-
/Library/Preferences/com.apple.PowerManagementAC Power
For false:
/usr/bin/pmset -c sleep 1For true:
/usr/bin/pmset -c sleep 0Slightly dim the display on battery
Section titled “Slightly dim the display on battery”System Settings › Battery › Options… › Slightly dim the display on battery
applications.systemSettings.battery.options.slightlyDimTheDisplayOnBattery = true; true or false
Where it's stored and what runs
-
/Library/Preferences/com.apple.PowerManagementBattery Power
For false:
/usr/bin/pmset -b lessbright 0For true:
/usr/bin/pmset -b lessbright 1Wake for network access
Section titled “Wake for network access”System Settings › Battery › Options… › Wake for network access
applications.systemSettings.battery.options.wakeForNetworkAccess = "Always"; One of: "Always""Never""Only on Power Adapter"
Where it's stored and what runs
-
/Library/Preferences/com.apple.PowerManagementAC Power -
/Library/Preferences/com.apple.PowerManagementBattery Power
For Always:
/usr/bin/pmset -b womp 1/usr/bin/pmset -c womp 1For Never:
/usr/bin/pmset -b womp 0/usr/bin/pmset -c womp 0For Only on Power Adapter:
/usr/bin/pmset -b womp 0/usr/bin/pmset -c womp 1Not covered
Section titled “Not covered”What this pane shows that can’t be declared, and why:
4 settings
- Current Source › UPS — only with a UPS attached
- Options › Automatic Graphics Switching — only on Intel Macs with two GPUs
- Options… › Optimize video streaming while on battery — not kept in a readable preference file; changing it writes none
- Options › Power Nap — not offered on Apple silicon (pmset powernap)