Skip to content

fix(tmux): pass truecolor through to ghostty#38

Merged
mlorentedev merged 1 commit into
mainfrom
fix/tmux-ghostty-truecolor
May 18, 2026
Merged

fix(tmux): pass truecolor through to ghostty#38
mlorentedev merged 1 commit into
mainfrom
fix/tmux-ghostty-truecolor

Conversation

@mlorentedev
Copy link
Copy Markdown
Owner

Summary

  • Add explicit xterm-ghostty:Tc entry to tmux terminal-overrides
  • Without it, 24-bit colour stops at the terminal boundary when running tmux inside Ghostty (default TERM=xterm-ghostty does not match the existing *256col* glob), and tmux falls back to 256 colour
  • Inert under any other terminal — pure additive change

Context

Prep work for spec TERM-001-ghostty-bootstrap (separate, not yet scaffolded). Shipping the tmux fix now as an atomic 1-line change so the moment Ghostty lands locally, truecolor works without re-deploying tmux.conf.

Test plan

  • bats tests/tmux.bats — all 8 tests pass (new test 8 asserts xterm-ghostty:Tc presence)
  • tmux -f tmux.conf -L test new-session -d 'true' parses cleanly (covered by test 2)
  • Manual: open tmux inside Ghostty (once installed), confirm $COLORTERM=truecolor and a 24-bit colour test prints a smooth gradient (deferred to TERM-001)

The existing terminal-overrides glob *256col*:Tc only matches outer
terminals whose TERM contains "256col" (xterm-256color, screen-256color).
Ghostty advertises TERM=xterm-ghostty by default, so 24-bit colour
stopped at the terminal boundary and tmux fell back to 256.

Add an explicit xterm-ghostty:Tc entry. Inert under any other terminal.

Prep work for TERM-001-ghostty-bootstrap (separate spec).
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