feat(window): add configurable opacity - #84
Merged
Conversation
Add a window.opacity config (0.0-1.0, default 1.0). When below 1.0 the window is created transparent and the terminal background is filled with that alpha while text and UI chrome stay opaque. Alpha handling is compositor/platform-dependent (best-effort).
roramirez
force-pushed
the
feat/config-window-opacity
branch
from
August 9, 2026 17:40
f4ef0f8 to
3bf93c0
Compare
The alpha only reached the global buffer fill and the pane background, so every cell repainted itself opaque and the transparency was visible only in the pane padding at the window edges. Thread a BgAlpha (alpha + default background) down to resolve_bg_color and pack the alpha into cells still on the default background. Cells with an application-set background, the cursor, the selection, and search highlights stay opaque; glyph blending already forces full alpha.
roramirez
force-pushed
the
feat/config-window-opacity
branch
from
August 9, 2026 17:42
3bf93c0 to
a3d9028
Compare
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.
Summary
Adds a
window.opacityconfig option (float,0.0–1.0, default1.0). When set below1.0, the window is created transparent and the terminal background is rendered with that alpha, while text, glyphs, and UI chrome (tab bar, status bar, separators) stay fully opaque.Note: alpha handling in softbuffer is platform/compositor-dependent (X11 vs Wayland vs macOS/CoreGraphics), so this is best-effort and requires a compositor that supports transparency.
Changes
config: addopacity: f32toWindowConfigwith#[serde(default = "default_opacity")](default1.0); addopacity = 1.0toassets/config.toml.config(TUI): addF_OPACITYfield (FieldKind::Float, "Opacity", hint "0.0–1.0 window background opacity"); parse and clamp to0.0..=1.0inbuild_config.renderer: addcolor_u32_with_alpha(c, a)packing alpha into the high byte (0xAARRGGBB); threadopacitythroughRenderer::drawanddraw_pane, applying it to the frame background clear and per-pane background fills only.winit_handler: request.with_transparent(true)whenopacity < 1.0.doc/SPEC.mdconfig table + prose,README.md[window]block,CHANGELOG.md.How to test
cargo test— full suite passes (1225 tests).cargo clippy --locked -- -D warnings— clean.opacity = 0.8under[window]inconfig.tomland launch under a compositor that supports transparency; the terminal background is translucent while text stays readable.