-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add grid movement and resizing functions #64
Conversation
This PR and its intentions look quite good to me. I have only one question: how do you set the width and height of the grid? |
These functions re-use existing grid properties set using `waitron
window_put_in_grid`. If no grid properties exist on a window when
calling these functions, they return immediatly without modifying the
window's geometry.
Tudor Roman writes:
… This PR and its intentions look quite good to me. I have only one question: how do you set the width and height of the grid?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only remaining this is to remove the grid state when the window is altered (i.e. ungridding it in unmaximize_window
).
These two functions respectively move and resize windows that were previously put in a grid using window_put_in_grid. A grid struct is added to clients to save the current client position in the grid.
These name changes reflect the fact that a gridded window is special but not maximized.
A window should not be rest if it is not special to begin with
Done! |
Looks great! One last question: what happens to the gridded windows if you change the parameters of the grid? |
Do you mean if a window is in a 9x9 grid and it is changed to another value (eg. 5x5)? Then it should simply redraw the window in the new grid given that grid parameter can only be changed by |
Looks legit then. |
@tudurom Nice catch. I never monocle or maximize windows so I didn't test these cases properly. |
it's not about monocling or maximizing, but just moving or resizing the window normally while in grid state. |
I would like to reopen PR #57.
It has been a year since I closed the original PR since the two grid-based operations I proposed could be implemented outside of windowchef with the help of wmutils, and it seemed good enough for me at the time.
After a year of using different window managers, namely windowchef, mwm (my fork of windowchef), fvwm, wmutils, cwm, awesome, qtile and bspwm, I am still struggling to settle on a wm for good mainly because none of these wms have grid operations baked-in by default. I considered several other options before opening this PR:
Since neither of these options seem to cut it, I would like to merge these two functions to windowchef's core. I have other cool grid operations in mind that could be easily be implemented if this PR is merged (notably increasing and decreasing grid size on all four sides simultaneously).
Of course I would like to know what other windowchef users think of these changes and if they would be interested in using these kind of operations. If no one is really interested I think I will stick with maintaining my own branch.