Skip to content

Migration to ratatui_image instead of viuer#969

Open
sakashimaa wants to merge 3 commits into
aome510:masterfrom
sakashimaa:feat/ratatui-image-migration
Open

Migration to ratatui_image instead of viuer#969
sakashimaa wants to merge 3 commits into
aome510:masterfrom
sakashimaa:feat/ratatui-image-migration

Conversation

@sakashimaa

@sakashimaa sakashimaa commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Resolves #963

Screenshot:
image

Summary

  • Replace viuer with ratatui-image for rendering cover images
  • Remove manual set_skip / clear_area hacks — ratatui-image renders as a native ratatui widget
  • Remove viuer initialization in main.rs, use Picker::from_query_stdio() for protocol auto-detection
  • Remove cover_img_scale usage (no longer needed — scaling is handled by ratatui-image)

Notes

Picker::from_query_stdio() must run after enable_raw_mode() but before EnterAlternateScreen for correct protocol detection.

In nested terminals (e.g. neovim floating terminal), stdio queries don't reach the actual terminal emulator, so the protocol falls back to Halfblocks. This is a known limitation of ratatui-image's detection approach. Regular terminals (foot, kitty, iTerm2, etc.) work correctly

@aome510 aome510 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

This doesn't seem to work on iTerm2 for me

@aome510

aome510 commented Apr 11, 2026

Copy link
Copy Markdown
Owner

can you also look into updating the documents (README.md, config.md) to ensure they are up-to-date?

@sakashimaa

Copy link
Copy Markdown
Contributor Author

yeah i`ll watch iterm2 and docs

@sakashimaa

Copy link
Copy Markdown
Contributor Author
image

ive just installed fresh iterm2 on my mac air m2 and run app with --features image and it seems to work just fine. Which version of iterm2 you have?

@aome510

aome510 commented Apr 12, 2026

Copy link
Copy Markdown
Owner
image ive just installed fresh iterm2 on my mac air m2 and run app with --features image and it seems to work just fine. Which version of iterm2 you have?

hmm interesting, I got Build 3.6.9

Screenshot 2026-04-12 at 9 44 55 AM

@hanzpo

hanzpo commented Apr 21, 2026

Copy link
Copy Markdown

I tested it on ghostty + tmux on macos with allow-passthrough on for tmux. It didn't work properly until i manually forced picker.set_protocol_type(ProtocolType::Kitty). Not sure if this is a configuration issue on my end but hope this helps!

@csanthiago

Copy link
Copy Markdown

I tested the PR, the image doesn't load, but spotify_player works as expected.

Sending some specs, in case it helps.

OS: NixOS 26.11 (Zokor) x86_64
Kernel: Linux 7.0.10
Shell: fish 4.7.1
WM: niri unstable 2026-06-05 (Wayland)
Terminal: zellij 0.44.3
Terminal Emulator: kitty 0.47.1

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.

replace viuer with ratatui-image

4 participants