Coder Social home page Coder Social logo

Comments (8)

hzeller avatar hzeller commented on June 1, 2024

Where do I find the terminal to test ? https://search.nixos.org/packages?channel=unstable&query=ghostty does not yield anything

from timg.

RGBCube avatar RGBCube commented on June 1, 2024

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?

from timg.

hzeller avatar hzeller commented on June 1, 2024

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.

from timg.

mitchellh avatar mitchellh commented on June 1, 2024

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.

from timg.

hzeller avatar hzeller commented on June 1, 2024

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.

from timg.

mitchellh avatar mitchellh commented on June 1, 2024

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

from timg.

hzeller avatar hzeller commented on June 1, 2024

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 ?

from timg.

mitchellh avatar mitchellh commented on June 1, 2024

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.

from timg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.