Skip to content
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 rework #224

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Layout rework #224

wants to merge 15 commits into from

Conversation

PMunch
Copy link
Collaborator

@PMunch PMunch commented Feb 6, 2024

This commit moves all the layout logic and settings out from various modules and into the "masterstacklayout" module. With these changes it should be much easier to add new layouts.

There are still a couple actions like "moveWindowNext" which I guess technically might be said to belong to the "masterstacklayout" so it's possible that I might have to make some further changes in order to make new layouts work. But I believe this should be enough.


for client in this.taggedClients.clients:
if client.borderWidth != 0 or this.monitorSettings.layoutSettings.outerGap > 0:
client.borderWidth = this.windowSettings.borderWidth
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was just done to make things pass. Probably not quite correct, but I'm not entirely sure what this does.

@PMunch
Copy link
Collaborator Author

PMunch commented Feb 6, 2024

Tests are green now. Apart from the comment above I don't think there's anything I've missed now.

@PMunch
Copy link
Collaborator Author

PMunch commented Feb 6, 2024

Looked into implementing my new layout now. It seems like I might want to add a LayoutState object to the Client object and move some stuff from client.nim into masterstacklayout.nim as well. I don't want to remove things like fullscreen and floating because those don't really belong to the layout, but this way it would be easier to keep state for each client for a layout. Another option is to store it separately in a table, but that seems like too much work..

Allow width/height and x/y to be set even when not in floating mode, my
layout only responds to width/height at the moment, but maybe someone
else will need this. Otherwise it's just moving bits and pieces around.
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.

1 participant