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

Add action to create left split with custom size #2227

Open
idr4n opened this issue Sep 12, 2024 · 8 comments · Fixed by #2255
Open

Add action to create left split with custom size #2227

idr4n opened this issue Sep 12, 2024 · 8 comments · Fixed by #2255
Labels
contributor friendly A well-scoped, approachable issue for someone looking to contributor. gui GUI or app issue regardless of platform (i.e. Swift, GTK)

Comments

@idr4n
Copy link

idr4n commented Sep 12, 2024

Since there is new_split:right, new_split:dow, and new_split:top, I think it would be nice to have new_split:left as well.

Additionally, it would be great to be able to create splits of a given size, for example: new_split:left,30 would create a split to the left 30% the size of the surface.

I think this is the only feature that I am missing from WezTerm and Kitty 😅 . Otherwise, Ghostty is the perfect merge between a native feel terminal in macOS like iTerm (preserving window size and directory after restart) and the speed of Alacritty, with the features of WezTerm or Kitty.

Thanks for an awesome terminal!

@mitchellh mitchellh changed the title [Feature Request] Add action to create left split with custom size Add action to create left split with custom size Sep 12, 2024
@mitchellh mitchellh added the contributor friendly A well-scoped, approachable issue for someone looking to contributor. label Sep 12, 2024
@pluiedev
Copy link
Contributor

pluiedev commented Sep 16, 2024

BTW there isn't actually a new_split:top — Ghostty currently only does right and down splits due to how the split tree is internally structured. I'll see what I can do to implement it though

EDIT: Speedran through adding this in 9 minutes.

2024-09-16.12-54-11.mp4

@idr4n
Copy link
Author

idr4n commented Sep 16, 2024

@pluiedev you are absolutely right, my bad. I should have gotten confused with goto_split:top 😅.

@mitchellh mitchellh added gui GUI or app issue regardless of platform (i.e. Swift, GTK) and removed enhancement labels Oct 2, 2024
@mitchellh mitchellh reopened this Oct 8, 2024
@mitchellh
Copy link
Contributor

We now have split left and up thanks to @pluiedev from #2255. I'm still open to accepting sizes as well. I think my preferred syntax would be very close to what is suggested with one change:

new_split:left,30%

Requiring a % there so we have units.

@idr4n
Copy link
Author

idr4n commented Nov 1, 2024

We now have split left and up thanks to @pluiedev from #2255. I'm still open to accepting sizes as well. I think my preferred syntax would be very close to what is suggested with one change:

new_split:left,30%

Requiring a % there so we have units.

Hi @mitchellh. Just pushed a PR with my take on adding custom size splits using the suggested syntax.

@mitchellh
Copy link
Contributor

From #3839, I also propose we support an additional size that is a non-% for balancing splits after creation. I'm not sure what this should be, but it should be easy to support since we already support split equalization.

@jrnxf
Copy link

jrnxf commented Jan 4, 2025

What if we just supported chaining actions? Something like this:

new_split:left,equalize_splits

@mitchellh
Copy link
Contributor

That’s actually a much better suggestion. That’s already being planned in discussion so we should go with that

@em
Copy link

em commented Jan 6, 2025

new_split:left,equalize_splits would be perfect for me coming from iterm2 and loving how it equalizes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly A well-scoped, approachable issue for someone looking to contributor. gui GUI or app issue regardless of platform (i.e. Swift, GTK)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants