Skip to content

Clarification about the graphics protocol #8701

Description

@antirez

Hi! And thank you for creating Kitty and popularizing the Kitty Graphics Protocol. For us people living in the terminals is an incredibly powerful augmentation of our experience :)

I'm writing seeking for help. I'm writing a program (a Commodore 64 emulator) that should work both in Kitty and Ghostty. To do so, I need to update the same image (placement) on the terminal, so that every time I have a new frame buffer from the emulator, I can replace the image.

I'm able to do this easily in Ghostty referencing the same image id and using a=t in order to re-transfer the data: the image updates. I'm also able to do it in Kitty using the animation protocol. Like that:

  • First frame: printf("\033_Ga=T,i=%lu,f=24,s=%d,v=%d,q=2,c=30,r=10,m=%d;" ...) followed by printf("\033_Gm=%d;", more_chunks);

  • Next frames: printf("\033_Ga=f,r=1,i=%lu,f=24,x=0,y=0,s=%d,v=%d,m=%d;", ...) followed by printf("\033_Ga=f,r=1,m=%d;", more_chunks); and at the end of the chunks: printf("\033_Ga=a,c=1,i=%lu;", kitty_id);.

However apparently Ghostty does not support the animations, nor Kitty believes it is valid protocol to re-send the image data with a=t of an already displayed image, so I can't find a way to make both work. I wonder if you have any hint, and I hope that the two implementations will try to work in a more similar way in the future :) I believe that in the original specification having a=t in an already displayed image is unspecified behavior, so perhaps it could be used as well in Kitty as an update opreation not involving the animation? This way there could be a simpler way to handle animations that is compatible in both the implementations (and perhaps also the other implementations, like Konsole and so forth). Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions