Browse the docs

Displays

Passes when the number of displays or a display's name matches.

There are count displays

Details #

count passes when exactly that many displays are connected. name passes when any display's name contains the text, ignoring case. Give both and both must hold.

Every condition accepts "negate": true, which flips the verdict. The trace records what was compared before the flip, so a negated condition that blocks a macro still shows the real values.

Conditions in an Only if list combine with all: every one must pass, and an empty list always passes. An if step or a repeat loop takes a match of all (default) or any.

The trace shows count and names, the list of connected display names.

Parameters #

ParameterTypeRequiredValuesWhat it does
countwhole numberExact number of connected displays.
nametextPart of a display's name, such as LG or Studio Display.

Examples #

Only with an external display
When
  1. Press ⌃⌥J
Only if
  1. If 2 displays are connected
Do
  1. Show “Two displays”
Open in Switchboard to try it
Only with a Studio Display
When
  1. Press ⌃⌥J
Only if
  1. If the display “Studio Display” is connected
Do
  1. Show “Studio Display connected”
Open in Switchboard to try it

Gotchas #

  • With no params the condition always passes.

See also #