Better image previews on Wayland
Closed this issue ยท 9 comments
Hi,
lf on wayland uses chafa not ueberzug, thus the preview has low resolution.
Changing the login to Xorg it seems to use ueberzug and preview has good resolution.
But I don't know what software is causing the issue.
Where is the problem? On ueberzug, on wayland, on lf or on ctpv?
Ueberzug is Xorg only, it's not supported on Wayland. You can try using Kitty terminal, it supports normal image rendering on Wayland. I know that there are some protocols that other terminals use for rendering images on Wayland, I will look into how to implement those into ctpv.
I know that there are some protocols that other terminals use for rendering images on Wayland, I will look into how to implement those into ctpv.
If it helps, Wezterm supports the iTerm image protocol and comes with a an example renderer utility like icat.
Many terminals seem to support Sixel format but lf, for which ctpv was written, doesn't support it.
There was an attempt to add support for Sixel to lf but it didn't work out.
I've switched to Wayland recently. Just letting you know, 'cause it means that I am now more motivated to find a solution for this problem. ๐
Actually, previews do work on xwayland terminals like alacritty, kitty, urxvt, etc. But on "wayland only" terminals such as foot, I still have issues with previewing.
For wayland, you can use kitty
, kitty's icat utility can help you to preview images. Also, wezterm
supports iTerm2 inline images protocol. I don't know if other terminal emulators have similar things.
I tested ncls
and chafa
in foot
terminal, ncls
has better color however it is not as good as it in other terminal emulators.
But on "wayland only" terminals such as foot, I still have issues with previewing.
Could you please elaborate which issues you have when using foot? Image previews are low resolution or don't work at all?
Guys, I've found a potential solution: #25 (comment)
You need to:
Fixed! See docs on how to setup here: https://github.com/NikitaIvanovV/ctpv/blob/0c882097f672b8d07c96f95296d904f3d5a81083/README.md#wayland