Unified window-rule store: query and mutate the rule set that maps windows to zones. Rules cross the wire as JSON strings — a single rule serializes to { id, name, enabled, priority, match, actions } and the whole set is a JSON object { _version, rules }. The daemon's WindowRuleStore stays the sole writer of windowrules.json.
| Well-known name | org.plasmazones.WindowRules |
| Source XML | org.plasmazones.WindowRules.xml |
| Methods | 7 |
| Signals | 1 |
| Properties | 0 |
Return the whole rule set as a JSON object string ({ _version, rules }). Empty string if the store is unavailable.
| Arg | Direction | Type | Description |
|---|---|---|---|
rulesJson | out | s *(string)* | JSON object string in the { _version, rules } shape. |
Replace the entire rule set. The payload is a JSON object string in the { _version, rules } shape (or a bare object whose rules array carries the list). Malformed entries are dropped and a warning logs the dropped/accepted/total counts. True if the payload parsed; a genuine change is also persisted.
| Arg | Direction | Type | Description |
|---|---|---|---|
rulesJson | in | s *(string)* | JSON object string carrying the rules array. |
ok | out | b *(bool)* | True if the payload parsed; a genuine change is also persisted. |
Append one rule from its JSON object string. Returns false if the JSON is malformed, the rule fails validation, or its id collides with an existing rule.
| Arg | Direction | Type | Description |
|---|---|---|---|
ruleJson | in | s *(string)* | JSON object string for a single rule ({ id, name, enabled, priority, match, actions }). |
ok | out | b *(bool)* | True if the rule was added. |
Replace the rule with the same id from its JSON object string. Returns false if the JSON is malformed, the rule fails validation, or no rule with that id exists.
| Arg | Direction | Type | Description |
|---|---|---|---|
ruleJson | in | s *(string)* | JSON object string for a single rule ({ id, name, enabled, priority, match, actions }). |
ok | out | b *(bool)* | True if the rule was replaced. |
Remove the rule with the given id. Returns false if the id is malformed or no rule with that id exists.
| Arg | Direction | Type | Description |
|---|---|---|---|
ruleId | in | s *(string)* | Rule UUID string. |
ok | out | b *(bool)* | True if a rule was removed. |
Set the enabled flag of the rule with the given id. Returns false if the id is malformed or no rule with that id exists.
| Arg | Direction | Type | Description |
|---|---|---|---|
ruleId | in | s *(string)* | Rule UUID string. |
enabled | in | b *(bool)* | True to enable the rule, false to disable it. |
ok | out | b *(bool)* | True if the rule's enabled flag was updated. |
Set the priority of the rule with the given id. Higher priority wins when multiple rules match a window. Returns false if the id is malformed or no rule with that id exists.
| Arg | Direction | Type | Description |
|---|---|---|---|
ruleId | in | s *(string)* | Rule UUID string. |
priority | in | i *(int32)* | New priority value. |
ok | out | b *(bool)* | True if the rule's priority was updated. |
Emitted whenever the store's rule set changes (add, update, remove, enable, priority, or full replace).
| Arg | Direction | Type | Description |
|---|---|---|---|
persisted | out | b *(bool)* | True when the in-memory change was successfully written to disk. False signals an in-memory mutation whose persist failed — consumers can branch on this to differentiate 'saved' from 'edited but divergent from disk'. |