feat(config): add window container behaviour rules

This commit adds a new static config option,
window_container_behaviour_rules, which similarly to layout_rules, takes
a map of window container count threshold => window container behaviour.

When the number of window containers on the screen meets a given
threshold, the new window container behaviour is applied to the
workspace.

This can be used to automatically change from creating new window
containers for new windows to appending new windows to existing window
containers when the number of window containers on the screen reaches
more than what can be comfortably laid out and viewed on a user's
screen.

resolve #953
This commit is contained in:
LGUG2Z
2025-01-25 20:24:52 -08:00
parent e2f7fe50c9
commit c364b90b3b
4 changed files with 66 additions and 8 deletions

View File

@@ -1284,7 +1284,7 @@
]
},
"layout_rules": {
"description": "Layout rules (default: None)",
"description": "Layout rules in the format of threshold => layout (default: None)",
"type": "object",
"additionalProperties": {
"type": "string",
@@ -1323,6 +1323,28 @@
}
]
},
"window_container_behaviour_rules": {
"description": "Window container behaviour rules in the format of threshold => behaviour (default: None)",
"type": "object",
"additionalProperties": {
"oneOf": [
{
"description": "Create a new container for each new window",
"type": "string",
"enum": [
"Create"
]
},
{
"description": "Append new windows to the focused window container",
"type": "string",
"enum": [
"Append"
]
}
]
}
},
"workspace_padding": {
"description": "Container padding (default: global)",
"type": "integer",