Lock Screen
Everything under System Settings › Lock Screen, as Nix options. Each one is named after the control
you'd click, and set under programs.nix-plist-manager.options in nix-darwin.
Login window shows
Section titled “Login window shows”System Settings › Lock Screen › Login window shows
applications.systemSettings.lockScreen.loginWindowShows = "List of users"; One of: "List of users""Name and password" "unset" puts back macOS's default.
Where it's stored and what runs
-
/Library/Preferences/com.apple.loginwindowSHOWFULLNAME
For List of users:
/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow SHOWFULLNAME -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow SHOWFULLNAME -bool false' >&2For Name and password:
/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow SHOWFULLNAME -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow SHOWFULLNAME -bool true' >&2For unset:
/usr/bin/defaults delete /Library/Preferences/com.apple.loginwindow SHOWFULLNAME 2>/dev/null || trueShow password hints
Section titled “Show password hints”System Settings › Lock Screen › Show password hints
applications.systemSettings.lockScreen.showPasswordHints = true; true or false "unset" puts back macOS's default.
Where it's stored and what runs
-
/Library/Preferences/com.apple.loginwindowRetriesUntilHint
For false:
/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow RetriesUntilHint -int 0 || echo 'nix-plist-manager: failed: /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow RetriesUntilHint -int 0' >&2For true:
/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow RetriesUntilHint -int 3 || echo 'nix-plist-manager: failed: /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow RetriesUntilHint -int 3' >&2For unset:
/usr/bin/defaults delete /Library/Preferences/com.apple.loginwindow RetriesUntilHint 2>/dev/null || trueShow the Sleep, Restart, and Shut Down buttons
Section titled “Show the Sleep, Restart, and Shut Down buttons”System Settings › Lock Screen › Show the Sleep, Restart, and Shut Down buttons
applications.systemSettings.lockScreen.showTheSleepRestartAndShutDownButtons = true; true or false "unset" puts back macOS's default.
Where it's stored and what runs
-
/Library/Preferences/com.apple.loginwindowPowerOffDisabled
For false:
/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow PowerOffDisabled -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow PowerOffDisabled -bool true' >&2For true:
/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow PowerOffDisabled -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow PowerOffDisabled -bool false' >&2For unset:
/usr/bin/defaults delete /Library/Preferences/com.apple.loginwindow PowerOffDisabled 2>/dev/null || trueTurn display off on battery when inactive
Section titled “Turn display off on battery when inactive”System Settings › Lock Screen › Turn display off on battery when inactive
applications.systemSettings.lockScreen.turnDisplayOffOnBatteryWhenInactive = "For 1 hour"; One of: "For 1 hour""For 1 hour, 30 minutes""For 1 minute""For 10 minutes""For 2 hours""For 2 hours, 30 minutes""For 2 minutes""For 20 minutes""For 3 hours""For 3 minutes""For 30 minutes""For 5 minutes""Never"
Where it's stored and what runs
-
/Library/Preferences/com.apple.PowerManagementBattery Power
For For 1 hour:
/usr/bin/pmset -b displaysleep 60For For 1 hour, 30 minutes:
/usr/bin/pmset -b displaysleep 90For For 1 minute:
/usr/bin/pmset -b displaysleep 1For For 10 minutes:
/usr/bin/pmset -b displaysleep 10For For 2 hours:
/usr/bin/pmset -b displaysleep 120For For 2 hours, 30 minutes:
/usr/bin/pmset -b displaysleep 150For For 2 minutes:
/usr/bin/pmset -b displaysleep 2For For 20 minutes:
/usr/bin/pmset -b displaysleep 20For For 3 hours:
/usr/bin/pmset -b displaysleep 180For For 3 minutes:
/usr/bin/pmset -b displaysleep 3For For 30 minutes:
/usr/bin/pmset -b displaysleep 30For For 5 minutes:
/usr/bin/pmset -b displaysleep 5For Never:
/usr/bin/pmset -b displaysleep 0Turn display off on power adapter when inactive
Section titled “Turn display off on power adapter when inactive”System Settings › Lock Screen › Turn display off on power adapter when inactive
applications.systemSettings.lockScreen.turnDisplayOffOnPowerAdapterWhenInactive = "For 1 hour"; One of: "For 1 hour""For 1 hour, 30 minutes""For 1 minute""For 10 minutes""For 2 hours""For 2 hours, 30 minutes""For 2 minutes""For 20 minutes""For 3 hours""For 3 minutes""For 30 minutes""For 5 minutes""Never"
Where it's stored and what runs
-
/Library/Preferences/com.apple.PowerManagementAC Power
For For 1 hour:
/usr/bin/pmset -c displaysleep 60For For 1 hour, 30 minutes:
/usr/bin/pmset -c displaysleep 90For For 1 minute:
/usr/bin/pmset -c displaysleep 1For For 10 minutes:
/usr/bin/pmset -c displaysleep 10For For 2 hours:
/usr/bin/pmset -c displaysleep 120For For 2 hours, 30 minutes:
/usr/bin/pmset -c displaysleep 150For For 2 minutes:
/usr/bin/pmset -c displaysleep 2For For 20 minutes:
/usr/bin/pmset -c displaysleep 20For For 3 hours:
/usr/bin/pmset -c displaysleep 180For For 3 minutes:
/usr/bin/pmset -c displaysleep 3For For 30 minutes:
/usr/bin/pmset -c displaysleep 30For For 5 minutes:
/usr/bin/pmset -c displaysleep 5For Never:
/usr/bin/pmset -c displaysleep 0Show message when locked
Section titled “Show message when locked”System Settings › Lock Screen › Show message when locked › Set…
The message shown on the lock screen and login window. Unset shows none.
applications.systemSettings.lockScreen.messageWhenLocked = "…"; Text "unset" puts back macOS's default.
Where it's stored and what runs
-
/Library/Preferences/com.apple.loginwindowLoginwindowText
For unset:
/usr/bin/defaults delete /Library/Preferences/com.apple.loginwindow LoginwindowText 2>/dev/null || trueFor …:
/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText -string '…' || echo 'nix-plist-manager: failed: /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText -string '\''…'\''' >&2Not covered
Section titled “Not covered”What this pane shows that can’t be declared, and why:
1 setting
- Password › Require password to wake computer — the delay is kept in the keybag and changing it needs the user’s password (sysadminctl -screenLock … -password)