Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sxyazi
Copy link
Owner

@sxyazi sxyazi commented Mar 4, 2025

Fixes #2440

Run Yazi with:

TERM=xterm-kitty yazi

sxyazi added a commit to yazi-rs/yazi-rs.github.io that referenced this pull request Mar 4, 2025
@sxyazi sxyazi merged commit 3606bc7 into main Mar 4, 2025
6 checks passed
@sxyazi sxyazi deleted the pr-ab120ce3 branch March 4, 2025 15:57
@tifandotme
Copy link

@sxyazi thanks, but it doesn't render the images properly as it used to.
Screenshot 2025-03-04 at 23 00 18

@sxyazi
Copy link
Owner Author

sxyazi commented Mar 4, 2025

Didn't see any abnormality, this is exactly how Chafa renders images with ASCII art.

@tifandotme
Copy link

tifandotme commented Mar 4, 2025

@sxyazi running yazi outside zellij will use Chafa, and it renders differently without weird artifacts:
Screenshot 2025-03-04 at 23 06 59

Here are more examples:
the new hack inside zellij:
Screenshot 2025-03-04 at 23 09 30
Screenshot 2025-03-04 at 23 09 26

outside zellij:
Screenshot 2025-03-04 at 23 08 29
Screenshot 2025-03-04 at 23 08 37

@tifandotme
Copy link

tifandotme commented Mar 4, 2025

@sxyazi hey, just found out TERM=xterm-kitty does the trick. renders the images properly without weird color shift

@tifandotme
Copy link


Yazi
    Version: 25.3.2 (Homebrew 2025-03-02)
    Debug  : false
    Triple : aarch64-apple-darwin (macos-aarch64)
    Rustc  : 1.85.0 (4d91de4e 2025-02-17)

Ya
    Version: 25.3.2 (Homebrew 2025-03-02)

Emulator
    TERM                : Some("xterm-kitty")
    TERM_PROGRAM        : None
    TERM_PROGRAM_VERSION: None
    Brand.from_env      : Some(Kitty)
    Emulator.detect     : Emulator { kind: Left(Kitty), light: false, cell_size: Some((15, 28)) }

Adapter
    Adapter.matches: Chafa

Desktop
    XDG_SESSION_TYPE           : None
    WAYLAND_DISPLAY            : None
    DISPLAY                    : None
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: None
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Variables
    SHELL           : Some("/opt/homebrew/bin/nu")
    EDITOR          : Some("vi")
    VISUAL          : None
    YAZI_FILE_ONE   : None
    YAZI_CONFIG_HOME: None
    YAZI_ZOXIDE_OPTS: None
    FZF_DEFAULT_OPTS: None

Text Opener
    default     : Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block-create: Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block-rename: Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })

Multiplexers
    TMUX               : false
    tmux version       : No such file or directory (os error 2)
    tmux build flags   : enable-sixel=Unknown
    ZELLIJ_SESSION_NAME: Some("didactic-tiger")
    Zellij version     : 0.41.2

Dependencies
    file          : 5.41
    ueberzugpp    : No such file or directory (os error 2)
    ffmpeg/ffprobe: 7.1.1 / 7.1.1
    pdftoppm      : 25.02.0
    magick        : No such file or directory (os error 2)
    fzf           : 0.60.3
    fd/fdfind     : 10.2.0 / No such file or directory (os error 2)
    rg            : 14.1.1
    chafa         : 1.14.5
    zoxide        : 0.9.7
    7zz/7z        : 24.09 / No such file or directory (os error 2)
    jq            : 1.7.1

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


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


@sxyazi
Copy link
Owner Author

sxyazi commented Mar 4, 2025

It could be that Chafa behaves differently with different TERM values. Good discovery - will update the documentation to use xterm-kitty instead.

@sxyazi
Copy link
Owner Author

sxyazi commented Mar 4, 2025

Done in yazi-rs/yazi-rs.github.io@9fb8dbc

@tifandotme
Copy link

@sxyazi thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed to force Yazi to use Chafa inside Zellij

3 participants