NikitaIvanovV / ctpv

Image previews for lf file manager
https://www.nikitaivanov.com/man1/ctpv
MIT License
264 stars 24 forks source link

Tearing chafa preview #47

Open Eitetsu0 opened 1 year ago

Eitetsu0 commented 1 year ago

Using ctpv with lf sc_20230320_02:28:04 The original image is 800x600

Any idea ?

NikitaIvanovV commented 1 year ago

Do you use original lf or some fork?

Eitetsu0 commented 1 year ago

Do you use original lf or some fork?

It's from the archlinux official repository . I believe it's the original.

. . Well , I removed set autochafa from the config file and it's not tearing now 😂 , but full filled with ? . sc_20230320_11:05:27

It looks good if I run ctpv from command line : sc_20230320_11:05:53

NikitaIvanovV commented 1 year ago

I've updated documentation for Wayland: read here.

So you need to set autochafa option back and install the lf fork.

NikitaIvanovV commented 1 year ago

Btw, I use this AUR package: https://aur.archlinux.org/packages/lf-sixel-git

Eitetsu0 commented 1 year ago

Thank you . Changing to lf-sixel-git + alacritty-sixel-git . But it's still the same problem.😂 with or without autochafa sc_20230321_11:01:40

Launch commands directly from command line looks ok .. Could force chafa to use sixel , but ctpv use char-arts anyway no matter I set autochafa or not. sc_20230321_11:03:09 sc_20230321_11:03:40

Also according to the README.md , a previewer script works. sc_20230321_11:35:08

NikitaIvanovV commented 1 year ago

To some reason chafa does not understand that your terminal supports sixel. I've just added chafasixel option to ctpv to force chafa to output sixel data. Please add set chafasixel to your ctpv config and try again.

Eitetsu0 commented 1 year ago

set chafasixel worked normally..

char-arts tearing though.😂

NikitaIvanovV commented 1 year ago

char-arts tearing though.😂

What do you mean? Could you please send a screenshot?

Eitetsu0 commented 1 year ago

With set chafasixel , ctpv displays a sixel image , which looks good and normal: sc_20230324_12:34:40

By default , ctpv use char-arts to preview in terminal (i.e. chafa -f symbols $FILENAME) , that will somehow tearing in my system . Sreenshoot : sc_20230324_12:33:59

Tested with lf lf-sixel , and terminals : alacritty alacritty-sixel termite(vte-based) xterm . It doesn't seem like terminal related.

NikitaIvanovV commented 1 year ago

I pushed a test change to a new branch: test-lf-width. Could you please test it?

Eitetsu0 commented 1 year ago

I pushed a test change to a new branch: test-lf-width. Could you please test it?

Tested , still the same problem.

By the way , the command line script for testing , in case any missing :

~/p/source/ctpv test-lf-width ?1 ❯ export XDG_CONFIG_HOME=/tmp
~/p/source/ctpv test-lf-width ?1 ❯ cat lfrc
set previewer ~/p/source/ctpv/ctpv
set cleaner ~/p/source/ctpv/ctpvclear
&~/p/source/ctpv/ctpv -s $id
&~/p/source/ctpv/qiut/ctpvquit $id
~/p/source/ctpv test-lf-width ?1 ❯ lf -config lfrc ~/Picture/chakra-wallpapers-giau-master/800x600.jpg