Closed RGBCube closed 9 months ago
Where do I find the terminal to test ? https://search.nixos.org/packages?channel=unstable&query=ghostty does not yield anything
Where do I find the terminal to test ? search.nixos.org/packages?channel=unstable&query=ghostty does not yield anything
It is currently in closed beta, but you can ask @mitchellh for an invite.
But I can test for you if you'd like, does timg not check env vars for this anyway?
Usually, timg uses a terminal query directly, the equivalent of doing the following in the shell:
echo -e "\033[>q"
Environment variables are typically avoided and only used as fallback in some cases for terminals that don't provide that query.
I haven’t looked at the source for this project and I’m typing from mobile so I apologize for anything brief or mistaken.
@RGBCube the documented way (by Kitty) to check for graphics protocol support is to query it: https://sw.kovidgoyal.net/kitty/graphics-protocol/#querying-support-and-available-transmission-mediums I assume this project probably does this but like I said I’m on mobile and haven’t checked.
It’s also very possible Ghosttys kitty graphics protocol has bugs. We have many testers using the image protocol but there’s a lot of configurability in the protocol so it’s possible some aspects are wrong.
@hzeller i am happy to give you an invite if you’re interested but I’ll also look into this myself.
I am not using the Kitty graphical query anymore as it turns out that that messes up other terminals. So that is why timg is using the regular terminal query to figure out the name and version of a terminal (\033[>q
)- that is typically implemented by all terminals.
For testing, yes I'd be interested for an invite and to compile ghostty
myself to see.
I am not using the Kitty graphical query anymore as it turns out that that messes up other terminals.
Yikes, which terminals? I know Terminal.app spews garbage for DCS sequences but wasn't sure what others.
So that is why timg is using the regular terminal query to figure out the name and version of a terminal (\033[>q)- that is typically implemented by all terminals.
Ah, well this is Ghostty's result (including the control characters for the response)
^[P>|ghostty 0.1.0-main+571170c5^[\⏎
For testing, yes I'd be interested for an invite and to compile ghostty myself to see.
Sent you an invite. Please feel free to join our Discord if you'd like where you can talk to me directly if you have any issues/questions: https://discord.gg/ghostty
Alright, added detection. Ghostty now displays images automatically in Kitty format without need to specify the -pk
option.
(I was pleased that ghostty came already with all the nix flake configuration that it was a breeze to compile!)
Simple images and grid seems to work, but animations not yet, possibly due to the flipbuffer technique that timg is using.
In animations, timg creates two IDs which are then used for the even/odd images of an animation essentially for double-buffering. First image is sent with first ID, second image with second ID, third image with first ID and so on.
However it seems that ghostty
is not updating images when it comes with an already known ID, so the animation looks like it stops after the second frame.
So to fix, if the terminal gets a Kitty image with an ID it already has seen, it should update it.
Should I file and issue @mitchellh or can you take it from there ?
Oh thanks! I'll file an issue and CC you. I'm pretty confident that we are updating the internal state but we're not updating the GPU texture due to some caching on the ID.
Ghostty supports the kitty graphics protocol, but timg does not detect it by default.
Here is my env: