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

window size (resize) to absolute value and choice of axis #6382

Closed
ershov opened this issue Jun 21, 2023 · 10 comments
Closed

window size (resize) to absolute value and choice of axis #6382

ershov opened this issue Jun 21, 2023 · 10 comments

Comments

@ershov
Copy link

ershov commented Jun 21, 2023

Hi,
I have two questions:

  1. Is there a way to specify the window size in absolute units? resize-window only accepts positive or negative increments.
  2. Is there a way to ask Kitty to resize the window regardless the axis? If I have a split, the axis is known and I should't be required to specify it. But it's a required parameter and using a wrong axis fails the command.
@kovidgoyal
Copy link
Owner

  1. no
  2. no

@ershov
Copy link
Author

ershov commented Jun 21, 2023

Is there any specific reason for that or it would require significant effort to implement?

@kovidgoyal
Copy link
Owner

Layouts work by distributing available space between windows based on
biases. There is no concept of fixed size windows in kitty.
https://sw.kovidgoyal.net/kitty/layouts/

@ershov
Copy link
Author

ershov commented Jun 21, 2023

That's right. I was thinking of 'splits' layout. I thought it was fully manual. Does it support the 'bias' parameter?

@kovidgoyal
Copy link
Owner

Yes, every split has a bias associated with it.

@ershov
Copy link
Author

ershov commented Jun 21, 2023

layout_action bias unfortunately doesn't work for splits payout and it can't be changed dynamically. Maybe, because the Splits one doesn't override the apply_bias function? https://github.com/search?q=repo%3Akovidgoyal%2Fkitty%20apply_bias&type=code

I also tried a trick like enabled_layouts splits,splits:bias=90 but it looks like the bias option is ignored by Splits layout.

I however noticed a useful feature: it created two separate 'splits' layouts between which I can cycle. (but it doesn't solve the problem of setting a pre defined split size via the bias option)

@ershov
Copy link
Author

ershov commented Jun 21, 2023

Hmm ok it does implement modify_size_of_window though.

I think in layout_action it needs to implement the action name bias or some special action for this layout.

@ershov
Copy link
Author

ershov commented Jun 22, 2023

Can you please have a loot at #6386

@ershov
Copy link
Author

ershov commented Jun 22, 2023

I also have a neat solution for no.2 (increase/decrease/set size of window regardless the slit axis). Would you be interested in a pull request for that?

@kovidgoyal
Copy link
Owner

kovidgoyal commented Jun 22, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants