-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Images flicker and don't render properly in kitty terminal #181
Comments
w3m does have kitty support, but it is sorely lacking in documentation. To use images in kitty, you'll have to:
This is required because unlike w3mimgdisplay, the main w3m executable isn't linked to the libraries used to decode images. So the simplest workaround I found was to convert everything to PNG with ImageMagick and then send it to kitty. I may write a more proper solution in the future, but for now we're stuck with this. |
I definitely wouldn't say "stuck with". You've gone a great job with this.
I do not get a segmentation fault when trying it w/o the extra option, but the images do not work. I don't know where the logs may be to post them. And, if this seems unrelated to the original issue, I can start a new one. Or it may just be a problem with my machine in some other way. |
It's better than nothing, but still very far from ideal. Kitty also supports animations for example, currently however only the first frame of those is shown. Not to mention that calling
Yeah that's my bad, thanks for reporting. Just submitted a PR which should fix it. |
I'm very interested in using
I have uninstalled my distribution (Solus) repository version of [Edit] Oh, my bad, I didn't understand that |
Glad you got it figured out.
It is in the config file, at least for me... but you could try setting it up from the option setting panel too (opened by pressing `o'), it goes by the name "Inline image display method". Not that the flag doesn't work, it's just more convenient that way. |
Thanks! Adding |
Hmm... Funny thing is, newer However, older versions, which showed images with flickering, and had no So, may be there's some chance we can work around it? And get the best of two worlds, with |
Old versions should have the exact same behavior as the current version with That said, I wonder why it fails even with w3m's pixel_per_char fallback. I don't remember changing anything related to it... anyways, I'll check it later. |
After a bit more investigation on this front, my observations:
So how come kitty icat works in tmux? Turns out kitty developers have come Basically you have to print private unicode characters with certain colors So to get kitty + tmux images, we would have to implement the above extension. |
kitty version:
kitty 0.20.2 created by Kovid Goyal
w3m version:
w3m version w3m/0.5.3+git20210424, options lang=en,m17n,image,color,ansi-color,mouse,menu,cookie,ssl,ssl-verify,external-uri-loader,w3mmailer,nntp,gopher,ipv6,alarm,mark
This is the latest version compiled myself from this git repository. I was certain to include one that had this commit #177
When using w3m in the latest version of kitty (
w3m https://google.com
for example), the text renders fine, but the images do not render correctly. The render inline, but overlap the text as if they are behind the text. They also appear for a moment and then vanish. As I scroll, they flicker in and out of visibility. The issue is the same as described here: kovidgoyal/kitty#851, but there was no resolution to that issue except to say that (at the time) w3m didn't support kitty. It does now (if I understand correctly).I have tested on the same system using xterm and the images render correctly. Kitty also renders images correctly in other applications such as
ranger
and using the kittenicat
.Things I have tried (after a lot of googling):
image/*; kitty +kitten icat %s
tomailcap
to try and force w3m to use the icat kittenw3m -o imgdisplay='kitty +kitten icat %s
and even with a local image just for kicks-o image_scale=<percent>
-o inline_img_protocol=<number>
, as expected no images rendered except with mode 0, which was the flickering modeI have run out of ideas. I would like to use w3m, but I have kitty too integrated into my daily driver to switch terminals. I just wanted to report that I was having the issue. Happy answer any questions. Thank you.
The text was updated successfully, but these errors were encountered: