Closed beh-10257 closed 8 months ago
You can try adding exit 1
at the end of your preview. It's needed to prevent lf from caching the preview.
But that is wrong, ctpv is supposed to handle gifs by default, yet it doesn't. The problem is that chafa tries to animate the gif, which doesn't work in lf. I attempted adding an option to the chafa call to disable animation but some users reported that their image previews broke after that. I suspect it's because this option was introduced somewhat recently and many distros still use old versions of chafa.
AFAIK chafa also provides a library, maybe I can statically link it with ctpv and use internally? This way the gif previews will work everywhere and I won't have to rely on whatever chafa version user has installed on their system.
well I wanted the gif to be animated in the first place that's why I got through the hassle of creating my own commands so as I understand lf doesn't support animation right
No, apparently it does not, which is a pity. But maybe you can try ueberzug if you use X11? I used to use it and, if I remember correctly, gifs were animated.
ohh I didn't know that nice since I'm on wayland and I really don't want to switch then I guess I should wait until lf support sixels properly in the first place to ask for this feature request
https://github.com/jstkdng/ueberzugpp might help!
It's a drop-in replacement for ueberzug that supports Wayland and gif images.
so basically I added
to my ctpv config if I type ctpv filename.gif it will work perfectly but if I try to preview the same gif with lf It will not work