phosphor-window-rules

Unified window/context rule engine with one match language and cache.

Phosphor's single window-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 WindowRuleSet reads and writes windowrules.json at a fixed schema version, dropping malformed rules with a diagnostic.

Full API →

Key types

WindowRule
A single rule: { id, name, enabled, priority, match, actions }.
MatchExpression
Composable leaf/composite predicate tree with JSON serialization and cached regex.
RuleEvaluator
Descending-priority resolution into ResolvedActions, backed by a match cache.
WindowRuleSet
Ordered rule collection with a monotonic revision and windowrules.json I/O.

Dependencies

See also

References