Add action to create left split with custom size
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!
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.
https://github.com/user-attachments/assets/604c3246-4707-446a-bc6d-37a3c085f107
@pluiedev you are absolutely right, my bad. I should have gotten confused with goto_split:top 😅.
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.
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.
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.
What if we just supported chaining actions? Something like this:
new_split:left,equalize_splits
That’s actually a much better suggestion. That’s already being planned in discussion so we should go with that
new_split:left,equalize_splits would be perfect for me coming from iterm2 and loving how it equalizes
I hate those bump up messages, but I've just found this thread and I have an interest in the equalize_splits possibility.
Any update about implementing it?
Should the action new_split support equalize_splits, or should this problem be pushed off for #3175?
Multiple actions are highly desired. And it would make more sense that you chain this together.
Regardless, I am working on an implementation right now. I am designing it in a way to support future options beyond just %. Unsure how much more complicated it would be to add equalize_splits, but at least parsing it will be easy given my current implementation. Even if my final logic isn't used, my parsing logic seems valid / useful for this issue.