state()
Whether a named State is on. The same answer as the {{state.name}} token.
Details #
state("Deep work") is true while that State is on. {{state.deepwork}} says the same: after state. write the name in lower case with the spaces removed (deepwork), joined by underscores (deep_work), or exactly as typed when it is one word.
Outside the engine, where no State is running, it answers false. A name that matches no State is an error.
state("Deep work") ? "focus" : "normal"→
normalParameters #
Takes 1 argument.
{{ state(text) }}
Gotchas #
Use the function form for names with spaces or punctuation.
See also #
State is on, A State starts or ends, Triggers that watch: becomes true, States, waiting runs