joouha / euporie

Jupyter notebooks in the terminal
https://euporie.readthedocs.io
MIT License
1.54k stars 36 forks source link

Not detecting kitty image support on Mac, falls back to ANSI #113

Open sschuldenzucker opened 1 month ago

sschuldenzucker commented 1 month ago

On my Mac, euporie isn't detecting that I'm running it from within kitty and it doesn't display images (images are displayed as ANSI art). This affects all tools (notebook, preview).

Tools and versions:

steffen@srs ~ % echo $TERM
xterm-kitty
steffen@srs ~ % kitty --version
kitty 0.34.1 created by Kovid Goyal
steffen@srs ~ % euporie --version
euporie 2.8.2

Image support works just fine in other tools, e.g., kitten icat.

joouha commented 1 month ago

What happens if you run the following in kitty?

printf "\x1b_Gi=4294967295,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\\"

This is the terminal escape sequence euporie uses to detect kitty graphics support. The terminal should respond with \x1b_Gi=4294967295;OK\x1b\:

image

sschuldenzucker commented 3 weeks ago

Eh, gmgm, missed this, sorry. In fish, I get the following, in red.

18:00:33 steffen@srs ~> printf "\x1b_Gi=4294967295,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\\"
18:00:38 steffen@srs ~> _Gi=4294967295;OK\

In zsh, I get the following, not in red:

steffen@srs ~ % printf "\x1b_Gi=4294967295,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\\"
steffen@srs ~ % "\x1b_Gi=4294967295,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\\"Gi=4294967295;OK