ghostty icon indicating copy to clipboard operation
ghostty copied to clipboard

macOS: Add support for quick terminal sizing configuration

Open freepicheep opened this issue 10 months ago • 2 comments

Resolves #2384

Since support for customizing the initial size for the quick terminal has already been added for linux, I just had to expose the configuration to Swift with the C bindings.

Through the new QuickTerminalSize struct the user's custom configuration is used to set the height and width of the quick terminal. It supports pixels or percentage. It also supports a custom width for the quick terminal through the configuration.


EDIT to Include Demos

Adjusting Height

adjusting height

Adjusting Height and Width

adjusting height and width

freepicheep avatar Jun 11 '25 18:06 freepicheep

I broke some things with manually resizing the quick terminal window. I am working on fixing that.

freepicheep avatar Jun 12 '25 20:06 freepicheep

Here are some examples of the configurable and more adjustable quick terminal. I decided to expand the quick terminal on both sides when the width (for terminal from top, bottom, center) or height (from left, right, or center) is adjusted.

75% 75% and Adjustments from Top

resizable-from-top

75% 75% and Adjustments from Right

resizable-from-right

75% 75% and Adjustments from Center

resizable-from-center

No Config

no-config

freepicheep avatar Jun 23 '25 22:06 freepicheep

I pushed a rebase, no other changes.

mitchellh avatar Jun 30 '25 17:06 mitchellh

Thanks for your feedback and for rebasing it. I just implemented your suggestions and pushed the update.

freepicheep avatar Jun 30 '25 20:06 freepicheep

Is there anything I can do to move this PR forward?

freepicheep avatar Jul 11 '25 14:07 freepicheep

I think I remember this having some bugs which is why I didn’t merge after my original feedback was addressed. I’ll have to double check.

mitchellh avatar Aug 09 '25 04:08 mitchellh

I think I remember this having some bugs which is why I didn’t merge after my original feedback was addressed. I’ll have to double check.

Let me know if you find any. This is a feature I'm really looking forward to having and would like to see it ship with 1.2.

freepicheep avatar Aug 11 '25 13:08 freepicheep

Thanks again! I reviewed this, made some changes, and pushed them as #8402 because I couldn't modify this PR. Original authorship was maintained. I'll merge that once CI passes.

mitchellh avatar Aug 26 '25 17:08 mitchellh