feat(wm): add dynamic work area offsets #1524
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds a config setting to let you set custom work_area_offset_rules for a workspace, following a simlar schema as for layout_rules. Still WIP, I have yet to test it alongside #1476 so awaiting the verdict on that before doing further testing.
Example of a workspace configured to use this:
{ "name": "III", "layout": "BSP", "work_area_offset_rules": { "1": { "top": 100, "left": 400, "bottom": 200, "right": 800 }, "2": { "top": 0, "left": 200, "bottom": 0, "right": 400 }, "3": { "top": 0, "left": 0, "bottom": 0, "right": 0 } } }EDIT: I just found that monocle mode is bugged and is using the rule for having 1 window less than what the workspace had before entering monocle mode. So if you have 2 windows open and go to monocle mode it will count as having 1 window open, but if you have 4 windows it will count as having 3 windows open. Will have to add special case for monocle mode.