Skip to content

Conversation

@omark96
Copy link
Contributor

@omark96 omark96 commented Aug 2, 2025

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.

@omark96
Copy link
Contributor Author

omark96 commented Aug 2, 2025

I wanted to make it so you could set it for a monitor and it would be added to the workspace_globals, but I ran into some issues while doing that and decided to first focus on getting it to work as a workspace setting, but will take another look at making it possible to set as a monitor setting also.

@LGUG2Z
Copy link
Owner

LGUG2Z commented Sep 8, 2025

What's the latest news on this? 👀

@omark96
Copy link
Contributor Author

omark96 commented Sep 8, 2025

Already been a month? Damn... I have not done any more work on this since then. I can't quite remember what it was specifically, but I had some change I was thinking about implementing in case of my PR that added work_area_offset to the workspaces was implemented. I'll definitely see if I can find some time to freshen up my memory and finish up this PR.

@omark96 omark96 force-pushed the feat(wm)/dynamic-workspace-offset branch from 2782aaf to 49d3598 Compare October 10, 2025 14:44
This commit adds a config setting to let you set custom work_area_offset_rules for a workspace,
following the same schema as layout_rules.
@omark96 omark96 force-pushed the feat(wm)/dynamic-workspace-offset branch from 49d3598 to 5f3a36d Compare October 11, 2025 13:47
@omark96
Copy link
Contributor Author

omark96 commented Oct 11, 2025

So, put in the final work and should be ready for use now. The order of rules to check for is now in the order of:

  1. Work area offset rule that applies to this number of windows on this workspace.
  2. Work area offset set for that workspace
  3. Work area offset set for that monitor

Monocle view is excluded from the threshold rules and will use one of the other two work area offsets. This makes it so if you want different offsets for monocle vs when you have a single window you can do that, the use case that comes to my mind is to use monocle as a sort of maximize option. If you want the same behaviour for single window and monocle you can simply not set a threshold rule lower than 2 and it will have that behaviour as well.

@omark96 omark96 marked this pull request as ready for review October 11, 2025 18:29
@LGUG2Z LGUG2Z force-pushed the master branch 2 times, most recently from 07b6367 to b613986 Compare October 29, 2025 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants