Skip to content

Fit Ghostty windows to terminal rows and remove the tmux bottom gap - #43

Merged
akan72 merged 4 commits into
mainfrom
akan72/fix-ghostty-powerline-padding
Oct 5, 2026
Merged

akan72 merged 4 commits into
mainfrom
akan72/fix-ghostty-powerline-padding

Conversation

@akan72

@akan72 akan72 commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

A pixel-sized Ghostty window can leave unused space below its last complete terminal row. Extending the tmux Powerline backgrounds into that space produces rectangular tails; coloring the space with the terminal background leaves a dark strip instead.

Use regular windows sized in terminal cells, zero vertical padding, and native cell-step resizing. Hide the native titlebar/tab bar so it cannot consume a fractional number of rows after initial sizing. Start fresh windows at 120 × 32 cells, make the verified 18-point font explicit, and disable restoring old pixel-sized frames so they cannot bring the gap back on launch. Keep padding background neutral so any remaining horizontal space does not distort the separators.

This deliberately uses regular row-fitted windows rather than forced full-screen/maximized pixel rectangles, which can recreate a remainder. The native window buttons and tab bar are hidden; tmux provides the tabs. Apply through a fresh window because Ghostty 1.2.3 retains old padding-extension flags after reload. The exact config is installed locally, and a working fresh window is left open.

Test Plan

  • Passed /Applications/Ghostty.app/Contents/MacOS/ghostty +validate-config --config-file=/private/tmp/ghostty-powerline-fix/ghostty/config and validation of the installed symlinked config; passed git diff --check and the commit's secret check.
  • Launched the actual saved config with open -na /Applications/Ghostty.app --args -e /opt/homebrew/bin/tmux attach-session -t 0. The final fresh-launch test uses no font, padding, titlebar, grid-size, or save-state CLI overrides; all layout settings come from the saved config.
  • Captured real windows with screencapture -x -o -l3437 and screencapture -x -o -l3406, excluding macOS shadows and cropping only their bottom 100 pixels. The matched crops are both 2656 × 100, use the same tmux session/window and 18-point font, and show the intended window-layout change.
  • Ran python3 /private/tmp/ghostty-padding-evidence.lXWGTH/verify-gap-images.py: the center 48-pixel Powerline segment is pixel-identical after its vertical move. Before, a 24-pixel dark strip follows the status row; after, the row reaches the bottom edge with no dark strip or colored tails. The regular-window regression case reproduces the gap caused by native tab chrome; it is not merely a color comparison.
  • Confirmed the config-driven window is 120 × 32 cells with 22 × 48-pixel cells and a 2656 × 1536-pixel window. Also launched --window-height=31 --window-width=118; its 1488-pixel height equals 31 × 48 and its bar also reaches the bottom edge.
  • Uploaded both PNGs as GitHub attachments; verified SHA-256, image decoding, and their rendered PR table. Only ghostty/config appears in the branch's changed files and commit history; generated screenshots are not committed.
  • All eight CI checks passed on final commit 2c2ceb4: static checks, pre-commit, Actions security, secret history, macOS installation, Ubuntu installation, and both VPS installation targets.
Before — native tab chrome leaves a bottom gap After — fff912f, row-fitted window
Before: a dark strip remains below the complete Powerline status row After: the same status row reaches the bottom edge without a gap or distorted arrows

Fresh launch from the final saved config (2c2ceb4), with no layout overrides. The window is 2656 × 1536 pixels, the grid is 120 × 32 cells at 22 × 48 pixels per cell, and status colors reach the final scanline with no terminal-background strip:

Final persisted-config launch: no gap below the Powerline bar

@akan72
akan72 marked this pull request as ready for review October 4, 2026 20:50
@akan72
akan72 marked this pull request as draft October 4, 2026 21:08
@akan72 akan72 changed the title Fix Ghostty padding below the tmux Powerline status bar Fit Ghostty windows to terminal rows and remove the tmux bottom gap Oct 4, 2026
@akan72
akan72 marked this pull request as ready for review October 4, 2026 21:37
@akan72
akan72 merged commit 7ebb27c into main Oct 5, 2026
8 checks passed
@akan72
akan72 deleted the akan72/fix-ghostty-powerline-padding branch October 5, 2026 15:06
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.

1 participant