Skip to content

Conversation

@fiplox
Copy link

@fiplox fiplox commented Jan 22, 2024

Chafa with sixel support is broken with lf. The problem and a fix is described in this post gokcehan/lf#1582

@rxmmah
Copy link

rxmmah commented Feb 14, 2024

its still not working after the commit the images are pixelated alot

@heyzec
Copy link

heyzec commented Feb 29, 2024

Tested, can confirm this works

@UntimelyCreation
Copy link

Tested here too, works fine! Would really like to see this merged

@masroof-maindak
Copy link

@NikitaIvanovV can we please get this merged?

@SammyJenas
Copy link

Also confirming this works, using the Foot terminal

@ykhan21
Copy link

ykhan21 commented Oct 13, 2024

For the time being, you may be able to set a custom preview that is basically chafa -f sixels --polite on.
https://www.nikitaivanov.com/man1/ctpv#Defining_custom_previews

@Rikiub
Copy link

Rikiub commented Oct 16, 2024

A temporal fix is paste in your ~/.config/ctpv/config the following code:

preview image image/* {{
	chafa -s "${w}x${h}" -f sixels --polite on "$f"
}}

@amolinae06
Copy link

Does this even work? I compiled ctpv with this commit but I still get an error:
chafa: Output format given as '/home/amolinae/Pictures/screenshot.png'. Must be one of [iterm, kitty, sixels, symbols].

@masroof-maindak
Copy link

Does this even work? I compiled ctpv with this commit but I still get an error: chafa: Output format given as '/home/amolinae/Pictures/screenshot.png'. Must be one of [iterm, kitty, sixels, symbols].

Add

set forcechafa
set chafasixel

to ~/.config/ctpv/config

@amolinae06
Copy link

amolinae06 commented Jan 24, 2025

Does this even work? I compiled ctpv with this commit but I still get an error: chafa: Output format given as '/home/amolinae/Pictures/screenshot.png'. Must be one of [iterm, kitty, sixels, symbols].

Add

set forcechafa
set chafasixel

to ~/.config/ctpv/config

Huh, I am now getting a bunch of random text and numbers.

EDIT: nvm it was an issue on my end.

@octvs octvs mentioned this pull request Apr 24, 2025
octvs added a commit to octvs/nixpkgs that referenced this pull request May 14, 2025
Add missing pdf preview dependency. `ctpv` uses `pdftoppm` [1] to
preview pdf files. Required dependency was not included on the last PR
targeting `ctpv`, although it added the tools for other ftypes [2].

Fix chafa image privews by passing the missing flag via a patch. This
comes from a year long bug fix PR open at upstream, for details refer
there [3].

[1]: https://github.com/NikitaIvanovV/ctpv/blob/4efa0f976eaf8cb814e0aba4f4f1a1d12ee9262e/README.md#L58
[2]: github:NixOS#223487
[3]: github:NikitaIvanovV/ctpv#90
cafreo added a commit to cafreo/ctpv that referenced this pull request Oct 20, 2025
… (taken from fork ctpv-updated)

- new font preview using imagemagick
- new audio preview including important song properties and coverart

- removed information about lf-fork (NikitaIvanovV#72)
- add polite flag for chafa (NikitaIvanovV#90)
- replace "convert" with "magick" (NikitaIvanovV#104)
- sped up video previews
- use rsvg-convert for svg preview
- use soffice instead of libreoffice for libreoffice previews
- add highlighting for cat

- merged NikitaIvanovV#72, NikitaIvanovV#90, NikitaIvanovV#104
- fixed NikitaIvanovV#61, NikitaIvanovV#103
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants