mfontanini / presenterm

A markdown terminal slideshow tool
https://mfontanini.github.io/presenterm/
BSD 2-Clause "Simplified" License
1.19k stars 29 forks source link

Images are pixelated in kitty terminal #267

Closed stmcginnis closed 3 months ago

stmcginnis commented 3 months ago

This is likely something in my local configuration, but hoping someone here might know what that could be.

I can display images in kitty fine, and they look like I would expect:

image

But when I try to display images in a presentation, they are rendered horribly pixelated:

image

Am I missing some configuration or setting needed to make this rendering work well?


Kitty version: 0.35.1 Presenterm version: 0.7.0

stmcginnis commented 3 months ago

OK, turned out I needed to explicitly add --image-protocol kitty-local when launching. Is this expected? I assumed it would automatically detect that, but maybe something else is still missing?

mfontanini commented 3 months ago

Are you using tmux? It seems like the kitty detection is failing, which is a known issue under tmux. Only in that scenario you currently need to explicitly use --image-protocol, so you shouldn't need to set it unless you're using it.

You can make it the default in the config file so you don't have to pass it in every time if you are actually using tmux.

stmcginnis commented 3 months ago

I was not using tmux, and I opened a fresh instance of kitty just to make sure there wasn't some sort of leftover settings in my environment.

I did get around it by explicitly setting kitty-local in the config file, so things seem to be working well for me now. But if there are anything that would be useful to debug from this environment, just let me know. I'll close this issue for now.

Thanks for such a great tool!

mfontanini commented 3 months ago

Are you not setting the TERM environment variable to xterm-kitty? That's what it's supposed to be set to when you use kitty. Detecting kitty relies on this so it's possible you have overridden that environment variable to something else.

stmcginnis commented 3 months ago

Ah, that explains it then. I'm not setting it anywhere that I can find, but my $TERM is set to xterm-256color and not xterm-kitty. Guess I'll have to track down how/why that is being set, but at least that explains why this was happening. Thanks!