feat(wm): add threshold-based layout_options_rules for workspaces

Adds layout_options_rules to workspace configuration, allowing
layout_options to dynamically change based on container count. Uses the
same threshold semantics as layout_rules: when container count >=
threshold, the highest matching rule fully replaces the base
layout_options.
This commit is contained in:
Csaba
2026-03-27 23:11:45 +01:00
committed by LGUG2Z
parent e9a541d12b
commit d6b17bbc7c
8 changed files with 608 additions and 373 deletions
+33
View File
@@ -9683,6 +9683,26 @@
}
]
},
"layout_options_rules": {
"description": "Threshold-based layout options rules (container_count >= threshold -> use these options).\nSorted by threshold ascending at load time.",
"type": "array",
"default": [],
"items": {
"type": "array",
"maxItems": 2,
"minItems": 2,
"prefixItems": [
{
"type": "integer",
"format": "uint",
"minimum": 0
},
{
"$ref": "#/$defs/LayoutOptions"
}
]
}
},
"layout_rules": {
"type": "array",
"items": {
@@ -9985,6 +10005,19 @@
}
]
},
"layout_options_rules": {
"description": "Threshold-based layout options rules in the format of threshold => options.\nWhen container count >= threshold, the highest matching threshold's options\nfully replace the base `layout_options`.\nThis follows the same threshold logic as `layout_rules`.",
"type": [
"object",
"null"
],
"additionalProperties": false,
"patternProperties": {
"^\\d+$": {
"$ref": "#/$defs/LayoutOptions"
}
}
},
"layout_rules": {
"description": "Layout rules in the format of threshold => layout",
"type": [