Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*WezTerm* supports the *Kitty* Image protocol now #473

Closed
stevenxxiu opened this issue Jan 3, 2022 · 11 comments
Closed

*WezTerm* supports the *Kitty* Image protocol now #473

stevenxxiu opened this issue Jan 3, 2022 · 11 comments
Labels
enhancement New feature or request

Comments

@stevenxxiu
Copy link
Contributor

Per wez/wezterm#986, WezTerm now supports the Kitty image protocol.

The code at

/// until I'm told there's another terminal supporting the kitty
only checks for if term_name.contains("kitty"). This can include WezTerm now too.

@stevenxxiu stevenxxiu added the enhancement New feature or request label Jan 3, 2022
@Canop
Copy link
Owner

Canop commented Jan 3, 2022

Thanks.
I'll have a look.

@Canop
Copy link
Owner

Canop commented Jan 3, 2022

There's more to the problem than just detecting support.
I've implemented (presumed) correct protocol detection (see https://github.com/Canop/xterm-query) but for now I can't render the images the same way. I'll try to investigate more in the next days.

@Canop
Copy link
Owner

Canop commented Jan 5, 2022

It kind of works but I wonder if wezterm supports completely the protocol. Resizing doesn't seem to work, for example.

In Kitty:
image

In Wezterm:
image

Kitty's spec specifies that "The image will be scaled (enlarged/shrunk) as needed to fit the specified area" and Wezterm doesn't seem to respect that.

I've also another problem: the only way to correctly detect the support without having problems on some terminals seems to be to read an env var and there's no guarantee wezterm sets it in an adequate way.

@wez
Copy link

wez commented Jan 6, 2022

I made a comment over here: 0b15aed#r62986264 about detection

Kitty's spec specifies that "The image will be scaled (enlarged/shrunk) as needed to fit the specified area" and Wezterm doesn't seem to respect that.

For the scaling issue, can you clarify for me what's happening? Are you using the c and r keys to set the desired columns and rows for the image?

https://github.com/Canop/broot/blob/master/src/kitty/image_renderer.rs#L192-L199

@dankamongmen
Copy link

I've also another problem: the only way to correctly detect the support without having problems on some terminals seems to be to read an env var and there's no guarantee wezterm sets it in an adequate way.

i can tell you that Notcurses is detecting it via terminal query

@dankamongmen
Copy link

wez added a commit to wez/wezterm that referenced this issue Jan 6, 2022
This got lost along the way somewhere, but now it's back!

refs: Canop/broot#473
@wez
Copy link

wez commented Jan 6, 2022

I've fixed the scaling issue in wezterm!

wez added a commit to wez/wezterm that referenced this issue Jan 6, 2022
@Canop
Copy link
Owner

Canop commented Jan 6, 2022

I confirm the fix is working :)

image

@Canop Canop closed this as completed in 1e3d68f Jan 6, 2022
@Canop
Copy link
Owner

Canop commented Feb 20, 2022

@wez Has there been a release since your fix ?

Please see #509

@wez
Copy link

wez commented Feb 20, 2022

Not yet; they can use the nightly build for now

@namespaceYcZ
Copy link

What's the progress now? I found image rendering still not "full quality" on the nightly wezterm and the newest broot(on Windows).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants