Skip to content

Background configuration shows transparently on terminals with background/transparency #3325

@carlosedp

Description

@carlosedp

What system are you running Yazi on?

Windows WSL

What terminal are you running Yazi in?

Windows Terminal 1.23.12811

yazi --debug output

❯ yazi --debug
Found existing alias for "yazi". You should use: "fm"

Yazi
    Version: 25.9.15 (Nixpkgs 2025-05-30)
    Debug  : false
    Triple : x86_64-unknown-linux-gnu (linux-x86_64)
    Rustc  : 1.91.1 (ed61e7d7 2025-11-07)

Ya
    Version: 25.9.15 (Nixpkgs 2025-05-30)

Emulator
    TERM                : Some("xterm-256color")
    TERM_PROGRAM        : None
    TERM_PROGRAM_VERSION: None
    Brand.from_env      : None
    Emulator.detect     : Emulator { kind: Right(Unknown { kgp: false, sixel: true }), light: false, csi_16t: (10, 20), force_16t: true }

Adapter
    Adapter.matches    : Sixel
    Dimension.available: Dimension { rows: 46, columns: 96, width: 0, height: 0 }

Desktop
    XDG_SESSION_TYPE           : None
    WAYLAND_DISPLAY            : Some("wayland-0")
    DISPLAY                    : Some(":0")
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: None
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Variables
    SHELL              : Some("/home/carlosedp/.nix-profile/bin/zsh")
    EDITOR             : Some("nvim")
    VISUAL             : None
    YAZI_FILE_ONE      : None
    YAZI_CONFIG_HOME   : None
    YAZI_ZOXIDE_OPTS   : None
    FZF_DEFAULT_OPTS   : Some("--height 75% --prompt=\'» \' --pointer=\'▶\' --marker=\'✓ \' --cycle --reverse --tabstop 2 --multi --info inline-right --separator \'\' --bind \'?:toggle-preview\' --bind \'ctrl-/:toggle-preview-wrap\' --border thinblock --exact --no-mouse --preview-window=nowrap --preview \'/home/carlosedp/.dotfiles/bin/preview-helper {}\' --color=fg:#f8f8f2,bg:#282a36,hl:#bd93f9 --color=fg+:#f8f8f2,bg+:#44475a,hl+:#bd93f9 --color=info:#ffb86c,prompt:#50fa7b,pointer:#ff79c6 --color=marker:#ff79c6,spinner:#ffb86c,header:#6272a4")
    FZF_DEFAULT_COMMAND: Some("/nix/store/pb0dzfpd78p5gwrx9ysifsxf223dsgii-fd-10.3.0/bin/fd --strip-cwd-prefix --hidden --follow --no-ignore-vcs --type f")

Text Opener
    default     : Some(OpenerRule { run: "${EDITOR:-vi} %s", block: true, orphan: false, desc: "$EDITOR", for: None, spread: true })
    block-create: Some(OpenerRule { run: "${EDITOR:-vi} %s", block: true, orphan: false, desc: "$EDITOR", for: None, spread: true })
    block-rename: Some(OpenerRule { run: "${EDITOR:-vi} %s", block: true, orphan: false, desc: "$EDITOR", for: None, spread: true })

Multiplexers
    TMUX               : false
    tmux version       : tmux 3.5a
    tmux build flags   : enable-sixel=Unknown
    ZELLIJ_SESSION_NAME: None
    Zellij version     : No such file or directory (os error 2)

Dependencies
    file          : 5.45
    ueberzugpp    : No such file or directory (os error 2)
    ffmpeg/ffprobe: 7.1.1 / 7.1.1
    pdftoppm      : 25.10.0
    magick        : 7.1.2-8
    fzf           : 0.66.1
    fd/fdfind     : 10.3.0 / No such file or directory (os error 2)
    rg            : 15.1.0
    chafa         : 1.16.2
    zoxide        : 0.9.8
    7zz/7z        : 25.01 / 17.05
    resvg         : 0.45.1
    jq            : 1.8.1

Clipboard
    wl-copy/paste: 2.2.1 / 2.2.1
    xclip        : No such file or directory (os error 2)
    xsel         : No such file or directory (os error 2)

Routine
    `file -bL --mime-type`: text/plain


See https://yazi-rs.github.io/docs/plugins/overview#debugging on how to enable logging or debug runtime errors.

Describe the bug

I've built yazi from latest main branch with the recently merged #3317 but with my terminal configured with a background and transparency, the color only overlays and is not flat as expected.

Image

Yazi shows like this below where the white background only washes the UI (in the left, without the overall config, in the right, with a white background):

Image

The config is:

[app]
overall = { bg = "#ffffff" }

I've implemented using ratatui blocks in the branch below where the background is opaque so it doesn't allow this background bleed. I've also added a feature to set each separate pane to a the background color for more flexibility.

https://github.com/carlosedp/yazi/tree/background

Image

I can open a PR with it to discuss further. Also I could add a flag like "flat" or "opaque" (or whatever) to show the color as opaque or keep as is which is transparent.

Minimal reproducer

Open yazi with overall background config and a terminal which has background image or transparency.

Anything else?

The merged PR didn't address my previously opened issue #3256

Checklist

  • I tried the latest nightly build, and the issue is still reproducible
  • I updated the debug information (yazi --debug) input box to the nightly that I tried
  • I can reproduce it after disabling all custom configs/plugins (mv ~/.config/yazi ~/.config/yazi-backup)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions