Displays
Everything under System Settings › Displays, as Nix options. Each one is named after the control
you'd click, and set under programs.nix-plist-manager.options in home-manager.
True Tone
Section titled “True Tone”System Settings › Displays › True Tone
applications.systemSettings.displays.trueTone = true; true or false
Where it's stored and what runs
For false:
/usr/bin/osascript -l JavaScript -e 'ObjC.import('\''Foundation'\'');$.NSBundle.bundleWithPath('\''/System/Library/PrivateFrameworks/CoreBrightness.framework'\'').load;$.NSClassFromString('\''CBTrueToneClient'\'').alloc.init.setEnabled(false);' >/dev/nullFor true:
/usr/bin/osascript -l JavaScript -e 'ObjC.import('\''Foundation'\'');$.NSBundle.bundleWithPath('\''/System/Library/PrivateFrameworks/CoreBrightness.framework'\'').load;$.NSClassFromString('\''CBTrueToneClient'\'').alloc.init.setEnabled(true);' >/dev/nullWhen connected to TV
Section titled “When connected to TV”System Settings › Displays › When connected to TV
applications.systemSettings.displays.whenConnectedToTv = "Ask What to Show"; One of: "Ask What to Show""Choose Window or App""Mirror Entire Screen""Use as Extended Display" "unset" puts back macOS's default.
Where it's stored and what runs
-
com.apple.windowserver.displaysTVConnectPolicy(current host)
For Ask What to Show:
/usr/bin/defaults -currentHost write com.apple.windowserver.displays TVConnectPolicy -int 0 || echo 'nix-plist-manager: failed: /usr/bin/defaults -currentHost write com.apple.windowserver.displays TVConnectPolicy -int 0' >&2For Choose Window or App:
/usr/bin/defaults -currentHost write com.apple.windowserver.displays TVConnectPolicy -int 2 || echo 'nix-plist-manager: failed: /usr/bin/defaults -currentHost write com.apple.windowserver.displays TVConnectPolicy -int 2' >&2For Mirror Entire Screen:
/usr/bin/defaults -currentHost write com.apple.windowserver.displays TVConnectPolicy -int 1 || echo 'nix-plist-manager: failed: /usr/bin/defaults -currentHost write com.apple.windowserver.displays TVConnectPolicy -int 1' >&2For Use as Extended Display:
/usr/bin/defaults -currentHost write com.apple.windowserver.displays TVConnectPolicy -int 4 || echo 'nix-plist-manager: failed: /usr/bin/defaults -currentHost write com.apple.windowserver.displays TVConnectPolicy -int 4' >&2For unset:
/usr/bin/defaults -currentHost delete com.apple.windowserver.displays TVConnectPolicy 2>/dev/null || trueNight Shift…
Section titled “Night Shift…”Color temperature
Section titled “Color temperature”System Settings › Displays › Night Shift… › Color temperature
From less warm (0) to more warm (1).
applications.systemSettings.displays.nightShift.colorTemperature = 0.0;A number from 0 to 1
Where it's stored and what runs
For 0.0:
/usr/bin/osascript -l JavaScript -e 'ObjC.import('\''Foundation'\'');$.NSBundle.bundleWithPath('\''/System/Library/PrivateFrameworks/CoreBrightness.framework'\'').load;$.NSClassFromString('\''CBBlueLightClient'\'').alloc.init.setStrengthCommit(0.000000, true);' >/dev/nullFor 1.0:
/usr/bin/osascript -l JavaScript -e 'ObjC.import('\''Foundation'\'');$.NSBundle.bundleWithPath('\''/System/Library/PrivateFrameworks/CoreBrightness.framework'\'').load;$.NSClassFromString('\''CBBlueLightClient'\'').alloc.init.setStrengthCommit(1.000000, true);' >/dev/nullSchedule
Section titled “Schedule”System Settings › Displays › Night Shift… › Schedule
applications.systemSettings.displays.nightShift.schedule = "Off"; One of: "Off""Sunset to Sunrise"
Where it's stored and what runs
For Off:
/usr/bin/osascript -l JavaScript -e 'ObjC.import('\''Foundation'\'');$.NSBundle.bundleWithPath('\''/System/Library/PrivateFrameworks/CoreBrightness.framework'\'').load;$.NSClassFromString('\''CBBlueLightClient'\'').alloc.init.setMode(0);' >/dev/nullFor Sunset to Sunrise:
/usr/bin/osascript -l JavaScript -e 'ObjC.import('\''Foundation'\'');$.NSBundle.bundleWithPath('\''/System/Library/PrivateFrameworks/CoreBrightness.framework'\'').load;$.NSClassFromString('\''CBBlueLightClient'\'').alloc.init.setMode(1);' >/dev/nullAdvanced…
Section titled “Advanced…”System Settings › Show resolutions as list
Section titled “System Settings › Show resolutions as list”System Settings › Displays › Advanced… › System Settings › Show resolutions as list
applications.systemSettings.displays.showResolutionsAsList = true; true or false "unset" puts back macOS's default.
Where it's stored and what runs
-
com.apple.Displays-Settings.extensionshowListByDefault
For false:
/usr/bin/defaults write com.apple.Displays-Settings.extension showListByDefault -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.Displays-Settings.extension showListByDefault -bool false' >&2/usr/bin/defaults -currentHost delete com.apple.Displays-Settings.extension showListByDefault 2>/dev/null || trueFor true:
/usr/bin/defaults write com.apple.Displays-Settings.extension showListByDefault -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.Displays-Settings.extension showListByDefault -bool true' >&2/usr/bin/defaults -currentHost delete com.apple.Displays-Settings.extension showListByDefault 2>/dev/null || trueFor unset:
/usr/bin/defaults delete com.apple.Displays-Settings.extension showListByDefault 2>/dev/null || true/usr/bin/defaults -currentHost delete com.apple.Displays-Settings.extension showListByDefault 2>/dev/null || trueSystem Settings › Link to Mac or iPad › Allow your pointer and keyboard to move between any nearby Mac or iPad
Section titled “System Settings › Link to Mac or iPad › Allow your pointer and keyboard to move between any nearby Mac or iPad”System Settings › Displays › Advanced… › System Settings › Link to Mac or iPad › Allow your pointer and keyboard to move between any nearby Mac or iPad
applications.systemSettings.displays.universalControl.allowPointerAndKeyboardToMoveBetweenNearbyDevices = true; true or false "unset" puts back macOS's default.
Where it's stored and what runs
-
com.apple.universalcontrolDisable(current host)
For false:
/usr/bin/defaults -currentHost write com.apple.universalcontrol Disable -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults -currentHost write com.apple.universalcontrol Disable -bool true' >&2For true:
/usr/bin/defaults -currentHost write com.apple.universalcontrol Disable -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults -currentHost write com.apple.universalcontrol Disable -bool false' >&2For unset:
/usr/bin/defaults -currentHost delete com.apple.universalcontrol Disable 2>/dev/null || trueSystem Settings › Link to Mac or iPad › Push through the edge of a display to connect a nearby Mac or iPad
Section titled “System Settings › Link to Mac or iPad › Push through the edge of a display to connect a nearby Mac or iPad”System Settings › Displays › Advanced… › System Settings › Link to Mac or iPad › Push through the edge of a display to connect a nearby Mac or iPad
applications.systemSettings.displays.universalControl.pushThroughTheEdgeOfADisplayToConnect = true; true or false "unset" puts back macOS's default.
Where it's stored and what runs
-
com.apple.universalcontrolDisableMagicEdges(current host)
For false:
/usr/bin/defaults -currentHost write com.apple.universalcontrol DisableMagicEdges -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults -currentHost write com.apple.universalcontrol DisableMagicEdges -bool true' >&2For true:
/usr/bin/defaults -currentHost write com.apple.universalcontrol DisableMagicEdges -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults -currentHost write com.apple.universalcontrol DisableMagicEdges -bool false' >&2For unset:
/usr/bin/defaults -currentHost delete com.apple.universalcontrol DisableMagicEdges 2>/dev/null || trueNot covered
Section titled “Not covered”What this pane shows that can’t be declared, and why:
15 settings
- Ambience Section › Display Brightness — changes often; a declared value would fight the user
- Arrangement Section › Arrange multiple displays — per display hardware state, kept by the display system rather than in preferences
- Arrangement Section › Relocate menu bar — per display hardware state, kept by the display system rather than in preferences
- Characteristic Section › Overscan — per display hardware state, kept by the display system rather than in preferences
- Characteristic Section › Screen Rotation — per display hardware state, kept by the display system rather than in preferences
- Characteristic Section › Underscan — per display hardware state, kept by the display system rather than in preferences
- Displays Section › Display Settings — per display hardware state, kept by the display system rather than in preferences
- Miscellaneous Section › High Dynamic Range — per display hardware state, kept by the display system rather than in preferences
- Miscellaneous Section › Refresh rate — per display hardware state, kept by the display system rather than in preferences
- Profile Section › Display colors and calibration — per display hardware state, kept by the display system rather than in preferences
- Profile Section › Display Presets — per display hardware state, kept by the display system rather than in preferences
- Resolution Section › Display Options — per display hardware state, kept by the display system rather than in preferences
- Resolution Section › Screen Resolution — per display hardware state, kept by the display system rather than in preferences
- Automatically adjust brightness on the main display — kept by CoreBrightness, not in preferences
- Advanced › Automatically reconnect to any nearby Mac or iPad — no preference key found in the system libraries, and switching it changes no preference file