Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

use with fzf #139

Answered by hpjansson
sweetbbak asked this question in Q&A
Mar 12, 2023 · 2 comments · 2 replies
Discussion options

has anyone been able to get Chafa to work with the preview function on fzf? Kitty's icat recently broke after an update. So far ueberzug is the only one that still works to this day, which is kind of wild because its archived and gone. It sucks because I was using this functionality for a ton of really cool scripts for managing libraries of music, books, manga etc... I was wondering if anyone has got Chafa to work with fzf or maybe someone can clue me in on the matter

You must be logged in to vote

Looks like someone made it work: https://old.reddit.com/r/commandline/comments/o7xkjp/fzf_preview_anything/

PeFClic's reply in that thread indicates it's possible, although it seems like fzf was unable to pass through the escape codes needed to make sixel or other more advanced image protocols work.

They seem to be using Pistol with a configuration file entry that looks like this:

image/* chafa %pistol-filename%

You may want to add -f symbol to the command line if it's printing garbage (sixels or kitty protocol being filtered by fzf). I haven't tested this myself, so YMMV :-)

Replies: 2 comments 2 replies

Comment options

Looks like someone made it work: https://old.reddit.com/r/commandline/comments/o7xkjp/fzf_preview_anything/

PeFClic's reply in that thread indicates it's possible, although it seems like fzf was unable to pass through the escape codes needed to make sixel or other more advanced image protocols work.

They seem to be using Pistol with a configuration file entry that looks like this:

image/* chafa %pistol-filename%

You may want to add -f symbol to the command line if it's printing garbage (sixels or kitty protocol being filtered by fzf). I haven't tested this myself, so YMMV :-)

You must be logged in to vote
0 replies
Answer selected by sweetbbak
Comment options

chafa --format=symbols -s 30x30 path/to/img.png

chafa -s 30x30 path/to/img.png did not work in kitty, but adding --format=symbols somehow did the trick.

You must be logged in to vote
2 replies
Comment options

Might be worth reporting an issue against fzf for this. I think it's mangling the escape codes somehow.

Comment options

It should be a fzf thing, I get similar trouble with img2sixel too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /