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

Feature request: split by percentage #73

Open
sodface opened this issue Jan 23, 2024 · 3 comments
Open

Feature request: split by percentage #73

sodface opened this issue Jan 23, 2024 · 3 comments

Comments

@sodface
Copy link

sodface commented Jan 23, 2024

I have another feature request that's come up for the project I mentioned in this issue, that is, it would be nice to be able to specify a split size other than the current 50%. I have an onscreen keyboard that I can display and hide quite nicely by toggling between the hsplit and only commands. The only negative is that I don't want the keyboard at 50% split so I need to split and then perform multiple resizes. The osk has to redraw itself with every change in dimension.

Ideally I could do hsplit 65 and have a 65/35 split with the top taking up 65%, as in the below screenshot. I've tested the attached patch and it seems to work ok. When you have time, can you take a look and let me know what you think?

Thanks!

split-pct.patch.txt

split-osk

@sodface
Copy link
Author

sodface commented Jan 23, 2024

I should have mentioned that the patch accepts values between 1 and 99 for both hsplit and vsplit and defaults to 50% when no value is provided, keeping the current behavior.

@project-repo
Copy link
Owner

Hi sodface

Thanks a lot for the idea and patch! Actually this fits in very well
with our goal of including a numeric version of every command (at least
for the ones for which this makes sense), so we'd be very happy to
include this (also, if you have any other suggestions, feel free to let
us know so we can include them as well). If it's alright with you we'll
get back to you about this when we start looking into it.

Cheers
project-repo

@sodface
Copy link
Author

sodface commented Jan 25, 2024

Sounds great! I apologize for not remembering this functionality was already on your roadmap.

The attached patch is mostly adapted from the existing code for the workspaces command. A percent value seemed to be the easiest to implement and is sufficient for my use case above, but an exact pixel value would probably be preferable for anyone reading dump output and trying to save and restore layouts.

Thanks for the response and I'm happy to test any new features as you are able to work on them. Cheers!

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

No branches or pull requests

2 participants