phosphor-rules
Unified window/context rule engine with one match language and cache.
Phosphor's single rule engine: one composable match-expression language, one pluggable action set, one serialization format, and one evaluation pipeline with a match cache. Both the KWin effect and the daemon link this one implementation so match code lives in exactly one place. RuleEvaluator::resolve() walks the rule set in descending priority and accumulates the first action that fills each slot, and RuleSet reads and writes rules.json at a fixed schema version, dropping malformed rules with a diagnostic. Actions are slot-based descriptors registered in an ActionRegistry, so a new action type — setting a scrolling template, pinning a strip axis — is a registration rather than an engine change.
Key types
Rule{ id, name, enabled, priority, match, actions, managed }.MatchExpressionRuleEvaluator(windowId, revision) match cache.RuleSetrules.json I/O.RuleActionActionRegistry they register into.ContextRuleBridgeDependencies
QtCorephosphor-protocolphosphor-identityphosphor-fsloader
See also
References
- Library overview → The library's design notes in the API reference.
- Namespace index → Every symbol under
PhosphorRules::. - API reference → Classes, namespaces and D-Bus interfaces across every library.