kyoheiu / felix

tui file manager with vim-like key mapping
https://kyoheiu.dev/felix/
MIT License
712 stars 25 forks source link

chafa integration with preview doesn't seem to work... #166

Closed dkragen closed 1 year ago

dkragen commented 1 year ago

Hello,

Like felix, but I've run into a problem. Installed via cargo and downloaded and installed chafa. But with preview activated images do not render. Config file (.yaml) doesn't seem to offer any clues as to how to get the two to integrate; at least, using exec chafa [.jpeg,.png,etc] doesn't work, so another mechanism must obtain. Have separately tested chafa on image files; works. Have tested on both alacritty and Xterm. Any ideas?

kyoheiu commented 1 year ago

Could you tell me your environment, e.g. OS, window system if linux (X, wayland)? Also would appreciate if you can provide a screenshot of preview, and the output of chafa --version and fx --version in your terminal.

dkragen commented 1 year ago

Hello Uto,

Fedora 36, i3 wm, X. Chafa 1.8.0. The first attachment shows that preview works: it shows the directory contents on the right. The second image (misleadingly labelled 003) shows a png file which won't display.

Hope this helps,

-- Charles

On Sun, 18 Dec 2022 15:08:55 -0800, Kyohei Uto wrote:

Could you tell me your environment, e.g. OS, window system if linux (X, wayland)? Also would appreciate if you can provide a screenshot of preview, and the output of chafa --version in terminal.

-- Reply to this email directly or view it on GitHub: https://github.com/kyoheiu/felix/issues/166#issuecomment-1356897505 You are receiving this because you authored the thread.

Message ID:

kyoheiu commented 1 year ago

I can't see any attachment, please check. chafa --version's output is useful, so if you could please paste it here. It must be like this:

Chafa version 1.12.4

Loaders:  GIF ImageMagick JPEG PNG SVG TIFF WebP XWD
Features: mmx sse4.1 popcnt
Applying: mmx sse4.1 popcnt

Copyright (C) 2018-2022 Hans Petter Jansson et al.
Incl. libnsgif copyright (C) 2004 Richard Wilson, copyright (C) 2008 Sean Fox
Incl. LodePNG copyright (C) 2005-2018 Lode Vandevenne

This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Basically the image preview feature depends on chafa's output, so if something like chafa image.png does not show image properly, felix cannot show it either. I think it'd be better to test chafa in your terminal first. Also, I'd like to know whether felix can show other image files or not.

dkragen commented 1 year ago

I've tested .png and .jpeg files with both chafa via CLI independently and felix. Chafa will make an image. Felix won't. The full chafa version info is:

Chafa version 1.8.0

Features: mmx sse4.1 popcnt Applying: mmx sse4.1 popcnt

Copyright (C) 2018-2021 Hans Petter Jansson et al. Incl. libnsgif copyright (C) 2004 Richard Wilson, copyright (C) 2008 Sean Fox

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I've also attached anew the images of felix with preview.

Thinking that the problem may be that my chafa is out of date, I downloaded the source from hpjannson.org, but then was unable to verify it was legitimate... Mr. Jannson's public key has expired...

If the problem is the chafa version, then I'll message Mr. J.

My thanks,

Charles

On Tue, 20 Dec 2022 02:03:48 -0800, Kyohei Uto wrote:

I can't see any attachment, please check. chafa --version's output is useful, so if you could please paste it here. It must be like this:

Chafa version 1.12.4

Loaders: GIF ImageMagick JPEG PNG SVG TIFF WebP XWD
Features: mmx sse4.1 popcnt
Applying: mmx sse4.1 popcnt

Copyright (C) 2018-2022 Hans Petter Jansson et al.
Incl. libnsgif copyright (C) 2004 Richard Wilson, copyright (C) 2008
Sean Fox
Incl. LodePNG copyright (C) 2005-2018 Lode Vandevenne

This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

Basically the image preview feature depends on chafa's output, so if something like chafa image.png does not show image properly, felix cannot show it either. I think it'd be better to test chafa in your terminal first. Also, I'd like to know whether felix can show other image files or not.

-- Reply to this email directly or view it on GitHub: https://github.com/kyoheiu/felix/issues/166#issuecomment-1359111118 You are receiving this because you authored the thread.

Message ID:

kyoheiu commented 1 year ago

Thanks for the response, I still cannot see any attachment/image though. I'll check if the version is the cause of this later.

As a possibly quick fix, you can download the latest release from GitHub https://github.com/hpjansson/chafa/releases . That might work for you.

dkragen commented 1 year ago

I forwarded my prior e-mail to one of my other e-mail addresses (different provider). The attachments showed up. I think your email provider or settings must be stripping out attachments...

--Charles

On Tue, 20 Dec 2022 16:49:21 -0800, Kyohei Uto wrote:

Thanks for the response, I still cannot see any attachment/image though. I'll check if the version is the cause of this later.

-- Reply to this email directly or view it on GitHub: https://github.com/kyoheiu/felix/issues/166#issuecomment-1360607925 You are receiving this because you authored the thread.

Message ID:

kyoheiu commented 1 year ago

Ok, now I'm reading this thread via web browser, so could you paste the attachment on https://github.com/kyoheiu/felix/issues/166 ? Thank you.

kyoheiu commented 1 year ago

Seems figured out: felix calls chafa with the argument --animate=false, which is needed to show the static frame of gif, but this has been in chafa from v1.10.0, so if you use older version you probably cannot use the image preview. Minimal supported version must be on the document, so I'll add it. If you could upgrade chafa >= 1.10.0, this problem would be fixed I believe.

kyoheiu commented 1 year ago

Added to the document and help text #167 Thank you for pointing ths issue out! Hope you get the newer version. If you still have any problem with later version of chafa, please contact me here.

kyoheiu commented 1 year ago

@dkragen Hi, how was this going?

dkragen commented 1 year ago

Hello Uto,

Good! My thanks for responding so promptly and often before.

Re chafa-felix integration, after the public keys for chafa were updated, I was able to install it safely and it test it with felix Chafa works well with large pictures, enough to tell what the image is in the preview, which is good enough.

All the best,

DK

On Tue, 03 Jan 2023 19:01:19 -0800, Kyohei Uto wrote:

@dkragen Hi, how was this going?

-- Reply to this email directly or view it on GitHub: https://github.com/kyoheiu/felix/issues/166#issuecomment-1370435019 You are receiving this because you were mentioned.

Message ID:

kyoheiu commented 1 year ago

Awesome! 👍