Repository navigation
feat(web): terminal ANSI colors in themes and a terminal cursor setting - #178
Merged
Merged
Conversation
Themes now carry the terminal's 16 ANSI colors. Built-in and generated themes keep Ghostty's stock palette, VS Code imports read terminal.ansi* (falling back to VS Code's defaults), and the theme editor's advanced view lists them under Terminal colors. Appearance settings gain a Terminal cursor choice (block, bar, underline) applied as Ghostty's default cursor style, so programs that set their own cursor still win. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The terminal could only take its background, foreground, cursor and selection colors from a theme. The 16 ANSI colors were always Ghostty's built-in palette, and the cursor was always a block, so the terminal couldn't match an editor setup such as a Cursor/VS Code theme with an underline cursor.
ANSI colors in themes
terminalAnsiBlack…terminalAnsiBrightWhite). Built-in and generated themes keep Ghostty's stock palette, so nothing changes visually until a theme sets them. A test checks the defaults against the palette the wasm reports.GHOSTTY_TERMINAL_OPT_COLOR_PALETTE. The theme's 16 colors replace the head of the default palette, leaving the 256-color cube unchanged. Without a theme, the core resets to Ghostty's palette. Colors a program sets with OSC 4 still win.terminal.ansi*, flattens alpha over the terminal background, and fills unset colors with VS Code's own defaults, so an imported theme looks the way it did in VS Code. Open VSX downloads keep these keys.Terminal cursor setting
GHOSTTY_TERMINAL_OPT_DEFAULT_CURSOR_STYLE), so programs that set their own cursor through DECSCUSR still win, and the style survives terminal resets.This is web and desktop only. Mobile keeps its own terminal palette and preferences. Docs updated:
docs/user/appearance.md,docs/fork-differences.md.Screenshots still to add: I didn't launch a browser for this PR.
🤖 Generated with Claude Code (Claude Opus 5.5)