A State starts or ends
Runs the macro when a named State, such as Deep work or On the road, turns on, turns off, or either.
State name turns on or off
Details #
A State is a name for a situation, built from conditions: "Deep work is Xcode in front, no Zoom running". Switchboard keeps each State current. This trigger runs the macro when the State is entered (turns on), left (turns off), or both.
States come from the library (the States item in the sidebar). A State that you forced on or off from the menu bar also triggers.
| Input | What it holds |
|---|---|
state | The State's name. |
edge | entered or left. |
since | When the State last changed before this. |
{{triggerValue}} is the State's name.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
name | text | Yes | Required. The State's name, matched without regard to case. | |
edge | one of | entered left both | entered (default), left or both. |
Every trigger also takes Limits: a cooldown, the first time each day, every nth time, twice within seconds, a chance, only while you are at the Mac, on one Mac, or in a State. See Limits on any trigger.
Examples #
- “Deep work” starts
- Music: pause
Gotchas #
Nothing runs for the State being already on when Switchboard starts.
A State's own hold (2 seconds unless you set it) applies before it turns on or off.
See also #
A condition becomes true, State is on, state(), Triggers that watch: becomes true, States, waiting runs