mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-02 11:11:35 +02:00
feat(wm): add global layout_defaults for per-layout default options
Adds a top-level layout_defaults setting that defines default layout_options and layout_options_rules per layout. Workspaces without their own layout_options or layout_options_rules automatically inherit the global defaults. If a workspace defines either setting, all global defaults for that layout are fully replaced.
This commit is contained in:
+40
@@ -304,6 +304,16 @@
|
||||
"$ref": "#/$defs/MatchingRule"
|
||||
}
|
||||
},
|
||||
"layout_defaults": {
|
||||
"description": "Per-layout default options and rules, keyed by layout name.\nApplied as fallback when a workspace does not define its own layout_options or layout_options_rules.\nIf a workspace defines either setting, all global defaults for that layout are completely replaced.",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/LayoutDefaultEntry"
|
||||
}
|
||||
},
|
||||
"manage_rules": {
|
||||
"description": "Individual window force-manage rules",
|
||||
"type": [
|
||||
@@ -3290,6 +3300,36 @@
|
||||
"colours"
|
||||
]
|
||||
},
|
||||
"LayoutDefaultEntry": {
|
||||
"description": "Per-layout default options entry for the `layout_defaults` global setting.\nContains both base layout options and threshold-based layout options rules.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"layout_options": {
|
||||
"description": "Default layout options for this layout",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/LayoutOptions"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"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`.",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
"^\\d+$": {
|
||||
"$ref": "#/$defs/LayoutOptions"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"LayoutOptions": {
|
||||
"description": "Options for specific layouts",
|
||||
"type": "object",
|
||||
|
||||
Reference in New Issue
Block a user