lf icon indicating copy to clipboard operation
lf copied to clipboard

Sixel preview doesn't work after upgrading `chafa` to version 1.14

Open Steven79203 opened this issue 1 year ago • 3 comments

Just recently I noticed that my the sixel image preview stopped working. Instead of showing the image it just shows a bunch of characters on the preview space. Don't know exactly where is the problem since chafa is capable of showing the image in the terminal if I open it out of the file manager. Other previewers like ctpv also show the same problem. Both compiled and the packaged version that comes with Arch behaves the same way.

screenshot_20-01-2024_08-56-30

Details: System - Arch Linux Kernel - 6.7.0-arch3-1 Terminal emulator - foot version: 1.16.2 +pgo +ime +graphemes -assertions lf version - lf 31-1 Arch package

Steven79203 avatar Jan 20 '24 12:01 Steven79203

Starting from version 1.14.0, chafa now disables polite mode by default, which means additional terminal sequences are prepended to the previewer output, causing lf to not treat it as sixel data.

To fix this, please use the --polite on option when using chafa. This is also now included in the wiki example.

I will keep this issue pinned for a while.

joelim-work avatar Jan 22 '24 02:01 joelim-work

i am using ctpv as the previewer in lf, i did set sixel true but photos are showing bad. how can i pass --polite on in my case?

rxmmah avatar Feb 14 '24 03:02 rxmmah

@rxmmah This fork has the fix.

To install

git clone https://github.com/fiplox/ctpv.git -b chafa-fix
cd ctpv
sudo make install

You also need to put set chafasixel in ~/.config/ctpv/config.

ormai avatar Apr 26 '24 17:04 ormai

I think this has been pinned long enough, and everyone interested is now aware that the issue is actually with chafa/ctpv and not with lf.

Closing now.

joelim-work avatar May 20 '24 11:05 joelim-work