Skip to content

config: add equal option to window-padding-balance - #11491

Merged
mitchellh merged 1 commit into
ghostty-org:mainfrom
devsunb:window-padding-balance-equal
Mar 15, 2026
Merged

mitchellh merged 1 commit into
ghostty-org:mainfrom
devsunb:window-padding-balance-equal

Conversation

@devsunb

@devsunb devsunb commented Mar 14, 2026

Copy link
Copy Markdown
Contributor

Change window-padding-balance from bool to an enum with three values:

  • false - no balancing (default, unchanged)
  • true - balance with vshift that caps top padding and shifts excess to bottom (existing behavior, unchanged)
  • equal - balance whitespace equally on all four sides

This gives users who prefer truly equal padding a way to opt in without changing the default behavior.

@ghostty-vouch

ghostty-vouch Bot commented Mar 14, 2026

Copy link
Copy Markdown
Contributor

Hi @devsunb, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/ghostty-org/ghostty/blob/main/CONTRIBUTING.md for more details.

@ghostty-vouch ghostty-vouch Bot closed this Mar 14, 2026
@mitchellh

Copy link
Copy Markdown
Contributor

!vouch

ghostty-vouch Bot pushed a commit that referenced this pull request Mar 14, 2026
@ghostty-vouch ghostty-vouch Bot mentioned this pull request Mar 14, 2026
ghostty-vouch Bot added a commit that referenced this pull request Mar 14, 2026
Triggered by
[comment](#11491 (comment))
from @mitchellh.

Vouch: @devsunb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@mitchellh mitchellh reopened this Mar 14, 2026
@mitchellh
mitchellh requested review from a team as code owners March 14, 2026 15:18
@devsunb

devsunb commented Mar 14, 2026

Copy link
Copy Markdown
Contributor Author

@mitchellh Thank you. I was writing a Vouch Request after reading the Contributing Guide late.

I ran into image rendering issues with snacks.nvim inside tmux because WezTerm’s Kitty Image Protocol support does not currently support unicode placeholders. I first explored fixing this in WezTerm, but since I needed a solution sooner, I also began evaluating Ghostty, which is under active development.

To match my WezTerm setup more closely in Ghostty, I needed two things: even padding support, which this PR implements and which is similar to WezTerm’s window_content_alignment option, and FreeType font rasterization, which currently seems to require a manual build using zig build -Dfont-backend=coretext_freetype ....

I have read and agree with the AI Policy. Claude Code assisted me in understanding the codebase and generating code, but I have reviewed and understood all text and code included in this PR.

@mitchellh mitchellh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect except for one note.

Comment thread src/config/Config.zig Outdated
@mitchellh mitchellh added this to the 1.4.0 milestone Mar 15, 2026
Change `window-padding-balance` from `bool` to an enum with three
values:

- `false` - no balancing (default, unchanged)
- `true` - balance with vshift that caps top padding and shifts excess
  to bottom (existing behavior, unchanged)
- `equal` - balance whitespace equally on all four sides

This gives users who prefer truly equal padding a way to opt in without
changing the default behavior.
@devsunb
devsunb force-pushed the window-padding-balance-equal branch from 90bc422 to 86d9a04 Compare March 15, 2026 04:50
@devsunb
devsunb requested a review from mitchellh March 15, 2026 04:51

@mitchellh mitchellh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect except for one note.

@mitchellh
mitchellh enabled auto-merge March 15, 2026 04:52
@mitchellh
mitchellh merged commit c923655 into ghostty-org:main Mar 15, 2026
63 checks passed
christmic pushed a commit to christmic/Sylvander that referenced this pull request Aug 12, 2026
Triggered by
[comment](ghostty-org/ghostty#11491 (comment))
from @mitchellh.

Vouch: @devsunb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants