mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-08 22:15:14 +02:00
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:
@@ -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": [
|
||||
|
||||
Reference in New Issue
Block a user