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

Resizing non-master window #27

Closed
janbuchar opened this issue Feb 9, 2019 · 11 comments
Closed

Resizing non-master window #27

janbuchar opened this issue Feb 9, 2019 · 11 comments
Labels
enhancement New feature or request

Comments

@janbuchar
Copy link

Do you plan to implement resizing non-master windows in the Tile layout? For example, when I have the master window on the left side and two terminals on the right side, I would sometimes like to make one of those terminals taller.

@esjeon
Copy link
Owner

esjeon commented Feb 9, 2019

That's a cool idea, and it's probably possible.

FYI, non-master side of the layout is called stack, at least in dwm and likes.

My idea is that I can add a mapping from Tile to weight into TileLayout. Resizing a window vertically will change its weight based on its new size and the sum of all weights in the stack. The height of the window will be determined from the ratio of weights.

I think this ensures windows to have (rather) persistent sizes, regardless of user actions like minimizing, setting master, and reordering.

@esjeon esjeon added the enhancement New feature or request label Feb 9, 2019
@janbuchar
Copy link
Author

What you propose sounds way better than adjusting the sizes of the layout itself, regardless of the actual window placed in that slot. I like it!

esjeon added a commit that referenced this issue Apr 4, 2019
* implements feature suggested in #27
* tiles have different height based on their weights
* implements a new tile stacking function `stackTilesWithWeight`
* implements weight adjustment
esjeon added a commit that referenced this issue Apr 5, 2019
* a better implementation for #27 than e8859bd
* weights of all tiles are correctly adjusted
* implements `LayoutWeightMap`
@esjeon
Copy link
Owner

esjeon commented Apr 5, 2019

It took long enough to clean up the base structure, and now this is finally done. I really like how this is generalized into a function. Please feel free to try this and tell me if anything bothers you.

@janbuchar
Copy link
Author

Wow, awesome! Thanks for implementing this! I'm not sure what bindings I should use to resize the windows on the stack though...

@aerosol
Copy link

aerosol commented Apr 5, 2019

This is amazing @esjeon thank you so much

@esjeon
Copy link
Owner

esjeon commented Apr 5, 2019

I'm not sure what bindings I should use to resize the windows on the stack though...

I've been hesitating to change keybindings, but, yeah, it's about time. (Related: #36)

@janbuchar
Copy link
Author

Agreed. So, is there any way to try out resizing stack windows now?

@esjeon
Copy link
Owner

esjeon commented Apr 9, 2019

Oh, you can just resize with your mouse.

@janbuchar
Copy link
Author

I see. I was only trying it with Konsole windows and they didn't want to be resized for some reason. This is really cool, thanks!

esjeon added a commit that referenced this issue Dec 27, 2019
This commit implements only the actual function, since the keys were
there already (and misled lots of lots of people...).
@esjeon
Copy link
Owner

esjeon commented Dec 27, 2019

Sorry, it took too long, but I finally implemented the resizing feature.

A caveat is that, instead of using 8 keys for resizing all sides in both ways, I decided to stick with 4 keys(meta+ctrl+hjkl), and they resize only eastern and southern borders. I believe this should be suffice in most cases, and this behaviour can always be overriden per-layout basis for any special cases.

@esjeon
Copy link
Owner

esjeon commented May 31, 2020

Closing. I think this has been fully accomplished some time ago.

@esjeon esjeon closed this as completed May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants