thimc / lfimg

Image preview support for lf (list files) using Überzug
GNU General Public License v3.0
262 stars 47 forks source link

Sixel support when using chafa #53

Open brendenhoffman opened 1 year ago

brendenhoffman commented 1 year ago

I noticed in #43 it was said Wayland won't be officially supported, however I don't think it will be that hard and chafa may be a more universal solution than ueberzug. Chafa supports sixel graphics, if you were to run chafa -f sixel foo.jpg you would get a high quality image in your terminal. I tried simply adding this to the preview script, however it doesn't want to work inside of lf. I don't know too much about how lf works or how to debug your script while in lf, I am just hoping there is an easy solution, so that Wayland support isn't something you have to worry about, it should just work.

thimc commented 1 year ago

Hi,

I have to admit, I may have been to harsh which wasn't my really intent. Let me rephrase it, the unfortunate reality is that I don't use Wayland (because I use OpenBSD) and because of that, I feel it's a bit awkward accepting PRs for something I cannot confirm working. I haven't delved in to chafa on a deeper level so I can't really comment on your issue. I can try getting it working on X but then again, I cannot confirm it working on wayland.

I hope this clears things up

brendenhoffman commented 1 year ago

Oh I completely understand. The nice thing about chafa is I'm pretty sure its going to work as long as your terminal supports it. The only other thing I know of that needs to be addressed with chafa is gifs, which also does work in the terminal, sort of, but that's something for another time.

If you have suggestions to debug, I will gladly give it a go. lf doesn't put much output in the preview pane if it has an error though, unlike vifm.

Looks like there was a typo in my original post. You have to specify a format with -f, so the example should be chafa -f sixel foo.jpg