Open kyoheiu opened 1 year ago
viuer
's sixel
feature does not work on runtime because sixel-sys
doesn't provide its own compiled libsixel
library: cf. https://github.com/AdnoC/sixel-sys/issues/3
This library seems unmaintained for years.
feature-viuer
branch can show the image preview by blocks in any terminal, and if your terminal supports iTerm protocol, even the high-res one. But Many terminals are with libsixel
, which is not easily used in Rust code because of the issue above.
I think many user wants the high-res preview if available, so this branch is not completed. I leave this issue open to show the process.
In the current version chafa
supports the image preview in felix.
Refactored the image preview flow: Now in feature-viuer
branch it is supported by default, and if your terminal implements iTerm protocol (i.e. Wezterm) it can show the high-res image.
Furthermore, if your terminal supports sixel or kitty protocol, by installing chafa
you have the high-res preview.
Is there any chance that this could work using Tmux & Kitty?
Using Kitty as-is does work perfectly, I get images in high resolution using Chafa.
Using Tmux within Kitty does not work. I'm not sure to understand the intricacies of how does Chafa or those so-called Kitten for displaying images work, but I guess Tmux does something that prevents this behavior.
Do you think that this could be added to Felix? If not, can you explain ways to make it work or alternatives?
Looks like it is something about a multiplexer passthrough using Kitty & Tmux as discussed here https://github.com/hpjansson/chafa/issues/162
Thank you!
Just chiming in to note that tmux passthrough should indeed be working on Chafa master. It will be in the 1.14.0 release in a couple of days. Cheers!
Refactored the image preview flow: Now in
feature-viuer
branch it is supported by default, and if your terminal implements iTerm protocol (i.e. Wezterm) it can show the high-res image. Furthermore, if your terminal supports sixel or kitty protocol, by installingchafa
you have the high-res preview.
I'm on Windows. When I try to build this branch to get iterm previews I get the error:
user@host MINGW64 ~/repos/felix (feature-viuer)
$ cargo install --locked --path .
Installing felix v2.3.0 (C:\Users\user\repos\felix)
Updating git repository `https://github.com/kyoheiu/syntect`
error: failed to get `syntect` as a dependency of package `felix v2.3.0 (C:\Users\user\repos\felix)`
Caused by:
failed to load source for dependency `syntect`
Caused by:
Unable to update https://github.com/kyoheiu/syntect#b5212417
Caused by:
failed to clone into: C:\Users\user\.cargo\git\db\syntect-efeee53e6df11ed1
Caused by:
failed to authenticate when downloading repository
* attempted to find username/password via git's `credential.helper` support, but failed
if the git CLI succeeds then `net.git-fetch-with-cli` may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
Caused by:
failed to acquire username/password from local configuration
I'm able to build the main branch fine however. I'm using Wezterm and have chafa
but the image previews don't display with sixel for some reason. So, I was looking to use iterm.
Currently we need
chafa
to preview image files, but #186 enables it out of the box, usingviuer
. The problem is, that withviuer
the preview of gif animation could take a long time, which is really frustrating. This leads to not supporting high-res preview in both iTerm and kitty protocol. Reading gif as Frames viaimage
crate would be a solution.