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

PiMo layout algorithm #227

Draft
wants to merge 36 commits into
base: master
Choose a base branch
from
Draft

PiMo layout algorithm #227

wants to merge 36 commits into from

Conversation

PMunch
Copy link
Collaborator

@PMunch PMunch commented Mar 3, 2024

This is based directly off-of the layoutrework branch, so you can go ahead and merge that first and this becomes four commits.

Adds Nimdows first alternative layout, PiMo! PiMo is a non-overlapping window management strategy, similar to tiling window managers but respecting the size requested by the window (or controlled via app rules). Windows are laid out where there is room for them, trying to minimize how much other windows have to change their size. Moving windows around with left/right/up/down movements also tries to be as intuitive as possible. In addition to moving windows, making them float, and making them fullscreen PiMo also supports a couple more actions. Namely "expand X" and "expand Y", these basically tells the window manager that this window should attempt to be as large as possible in the X and/or Y directions. If an app rule is applied to all windows enabling both expansions the experience is similar to that of a tiling window manager, although PiMo will scale the available space based on the windows initial request. This means that if a large window like a browser is put next to a small window like a terminal then the browser will get more than 50% of the available width and the terminal will get slightly less.

Currently this should be in a useable state, however it is missing resizing options at the moment (these are very simple to implement, simply set the requested size and reshuffle the windows). I'm making this PR because I'm likely going to be away for about a week and I figured someone might want to try this out.

PMunch added 19 commits February 5, 2024 11:45
The bug requiring monitor section to be present or it would crash with a
cryptic message.
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.
Also add support for gaps. Initial idea for focus changing, but
currently no simple way to implement.
Note a great implementation, not a fan of how I needed to added
trackedClients as an argument. I tried adding monitor instead, but that
caused a lot of circular import issues that I was unable to disentangle.
@avahe-kellenberger
Copy link
Owner

I think it's missing pimo/areatools (in layouts/pimo.nim)

@PMunch
Copy link
Collaborator Author

PMunch commented Mar 3, 2024

Ah crap, you do indeed. I might be able to fix it tomorrow evening

PMunch added 9 commits March 4, 2024 07:03
Adds commands to grow and shrink a window in X and Y dimensions. Also
added support for outerGap and resizeStep. Otherwise just some bug fixes
and code cleanup.
The bug where not all actions where triggering correctly where caused by
incorrectly getting the active window. This fixes that bug and cleans up
the interface slightly.
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