Skip to content

Migration to ratatui_image instead of viuer#969

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

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

Conversation

@sakashimaa
Copy link
Copy Markdown
Contributor

@sakashimaa sakashimaa commented Apr 8, 2026

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

Copy link
Copy Markdown
Owner

@aome510 aome510 left a comment

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
Copy link
Copy Markdown
Owner

aome510 commented Apr 11, 2026

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
Copy link
Copy Markdown
Owner

aome510 commented Apr 12, 2026

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
Copy link
Copy Markdown

hanzpo commented Apr 21, 2026

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!

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

3 participants