-
Notifications
You must be signed in to change notification settings - Fork 195
Layout Per Tag #448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layout Per Tag #448
Conversation
In my head I equate workspaces to actual screen real estate and tags to collections of opened windows. This feature applied per workspace would allow specific workflows to take advantage of specific monitor dimensions/orientation. It would also allow for tags to define a certain workflow that could be set up on any workspace/monitor. |
I wholeheartedly agree on the idea of a layout manager! Maybe instead of a bool it is more like a tuple [[workspaces]]
x = 0
y = 0
height = 1200
width = 1920
layouts = ["MainAndDeck", "Monocle"]
apply_layout_to = ["workspace", "all_tags", "individual_tags"]
[[workspaces]]
y = 1200
x = 0
height = 1440
width = 1280
layouts = ["MainAndDeck"]
apply_layout_to = ["workspace"]
[[workspaces]]
y = 1200
x = 1280
height = 1440
width = 1280
layouts = ["MainAndDeck", "Monocle", "CenterMainBalanced", "LeftWiderRightStack"]
apply_layout_to = ["individual_tags"] |
Maybe this is not a configurable setting at all but a command that takes a layout plus a workspace or tag as arguments. Users can run the command to set a desired layout per tag or workspace in their up scripts to make it theme-able. Keeps it from propagating another setting throughout the code. Is that overly simplistic? |
Sorry a bit late to the conversation. The layout manager is a great idea. Abstracting code and concepts away is always a big win. I would even take it one step further and say you should pull each behavior into its own file under the layout manager module. |
So this has a base implementation of layout per tag being togglable between tag and workspace. It is ready and should be easy and extend this with greater customisation (don't know if we should wait for the new config format before deciding more complex configuration setups?). This has also simplified routing through the code with more things directly accessing what they need directly, and we are no longer passing around vectors of tags or layouts when not needed. This should be merged after the fixes #499 and #500, and I will fix any conflicts. Thanks! |
@AethanFoot I am excited to get this one merged in but am having a little trouble testing. I see the config setting to change from Tag to Workspace mode, but it doesn't seam to change anything. Am I missing something? I also see you are defaulting to Workspace. I think that is a really good Idea while we are still developing this. Lets keep the default at Workspace until we are sure we have all the kinks worked out. After that we can set it to whatever everyone wants. |
Ye so the config option is:
Which should allow you to a different layout and/or rotation per tag. |
I am experiencing three regressions, all only appear in
For the first two my guess is, that the repsective handlers and the state-file miss the change of layout. |
@VuiMuich hopefully those are fixed now? |
Jep looks good now, thanks! |
I am still experiencing layouts being applied by tags while in workspace mode. Here are the steps I did for testing:
Result: Expected: |
Ah, it appears Workspace needs to be quoted e.g. "Workspace". Can you check that pr fixes it, as I wasn't updating a tag moved to a visible workspace. |
Am afraid not. I am still seeing layouts follow the tags when in workspace mode |
Oh wait, heres the logic of workspace mode: Ignore this didn't see you swapped tags. If I am missing something, sorry currently writing up #511. |
Ok, I think this works now. Most definitely needs a cleanup, but it may easier to do this in a different pr as more may need to be refactored. |
@AethanFoot excellent work! |
@lex148 Thanks and thanks for the modabilities 😄! |
Tagging #260, #447, #292. This is just an initial commit, and to open a bit of a discussion. I agree with the notes in #447, where there should be an option to allow the user to choose to have per tag or per workspace layouts with which could be toggled via a command. Other issues we should address is the management of layouts, with this added complexity it becomes harder for a new dev to find their way through the code, e.g. the fact that the layout vec is stored in config, manager, workspace, and now tag. I feel it would be helpful to add a layout manager similar to the focus manager, which holds the list, which mode the user is in, and common functions around changing the layout.
Another option we could add would be choosing the mode per workspace, say tags sent to workspace one will be forced to the same layout but on workspace two will use the tags preferred layout.
Many Thanks!
Edit closes #260, closes #447.