Skip to content

fix(terminal): keep theme backgrounds solid under terminal opacity - #3

Merged
allisonhere merged 1 commit into
mainfrom
fix/solid-terminal-background
Nov 8, 2026
Merged

allisonhere merged 1 commit into
mainfrom
fix/solid-terminal-background

Conversation

@allisonhere

Copy link
Copy Markdown
Owner

kitty (and other terminals with background opacity) make every cell whose color equals the terminal's default background see-through. TerminalBackgroundSequences set that default to theme.Bg, the color applications paint every cell in, so with opacity configured the whole UI looked transparent.

  • TerminalBackgroundSequences(theme) keeps its signature but now sets the default one color step away from theme.Bg (TerminalDefaultBg), which is invisible to the eye but keeps every cell opaque.
  • New TerminalBackgroundSequencesFor(theme, transparent) and TransparentBackground(view, bg) let an app opt into real transparency: exact color plus SGR 49 for theme-background cells, while selected rows, overlays and other surfaces stay solid.
  • README's Terminal background section documents both.
  • Tests: the nudge, every built-in theme staying opaque, and the transparent rewrite.

Ported from TideMail 948785d (shipped in v1.9.0). Needed by tide, which has the same bug.

🤖 Generated with Claude Code

kitty applies background_opacity to every cell whose color equals the
terminal's default background. TerminalBackgroundSequences set that default
to theme.Bg, which applications paint every cell in, so with opacity
configured the whole UI looked see-through. Set it one step off the theme
color instead (TerminalDefaultBg).

Add TerminalBackgroundSequencesFor(theme, transparent) and
TransparentBackground(view, bg) for applications that want the opacity to
show through on purpose; other surfaces stay solid.

Ported from TideMail 948785d.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@allisonhere
allisonhere merged commit 4ef89a3 into main Nov 8, 2026
2 checks passed
@allisonhere
allisonhere deleted the fix/solid-terminal-background branch November 8, 2026 00:02
allisonhere added a commit to allisonhere/tide that referenced this pull request Nov 8, 2026
allisonhere/tideui#3 is merged (4ef89a3); pin that commit instead of the
deleted PR branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
allisonhere added a commit to allisonhere/tide that referenced this pull request Nov 8, 2026
…rency toggle (#15)

* fix: keep theme backgrounds solid under terminal opacity; add transparency toggle

kitty and similar terminals apply their background opacity to every cell
whose color equals the terminal's default background. Tide set that default
(OSC 11) to the theme background, which it paints every cell in, so with
opacity configured the whole UI looked see-through. Set the default one step
off the theme color instead, via tideui.TerminalDefaultBg, at startup and on
every theme change.

Settings > Display > Panes > Transparent background (display.transparent)
sets the exact theme color and rewrites theme-background cells to the
default background (tideui.TransparentBackground), so the terminal's opacity
shows through while selected rows and dialogs stay solid.

Ported from TideMail 948785d. Needs allisonhere/tideui#3; go.mod pins its
commit until that is tagged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Move Transparent background to second in Display, under Theme

It is a theme-level choice, so it sits in Appearance right below the theme
selector instead of at the end of Panes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Use tideui main with the merged terminal-background fix

allisonhere/tideui#3 is merged (4ef89a3); pin that commit instead of the
deleted PR branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.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.

1 participant