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

Add kitty graphics protocol support #8

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Add kitty graphics protocol support #8

wants to merge 3 commits into from

Conversation

wookayin
Copy link
Owner

@wookayin wookayin commented Apr 2, 2020

Work in progress. Upstream issue: #4

https://sw.kovidgoyal.net/kitty/graphics-protocol.html

  • works on plain kitty terminal
    e.g. python -m imgcat FILENAME.png or imgcat(np.array(...))

  • tmux support: it can print graphics, but they do not get cleared well

    • pixels per line information is missing, so it is quite difficult to allocate proper amount of spaces
  • Support all parameters

/cc @teto

@wookayin wookayin linked an issue Apr 5, 2020 that may be closed by this pull request
@ElPiloto
Copy link

Any chance this will get merged?

@wookayin
Copy link
Owner Author

I'll finish this soon. Thanks for bumping up!

@kzhang2

This comment was marked as duplicate.

@newzealandpaul

This comment was marked as duplicate.

@wookayin
Copy link
Owner Author

I can merge this soon, but it's really annoying (currently impossible) to make imgcat work well inside tmux. This is the limitation of kitty.

@nounder

This comment was marked as off-topic.

`imgcat.clear()` (or `imgcat --clear` in CLI) can be used to clear up
all remaining graphics artifacts (e.g., in kitty).
@wookayin
Copy link
Owner Author

tmux has now set -gq allow-passthrough on

This has nothing to do. This option is just for turning on the setting that is no longer default in tmux 3.3+; passthrough has existed since tmux v2. There is a limitation on the tmux passthrough buffer size, and what's worse is that how kitty deals with image artifacts inside a tmux is terrible. When the screen scrolling, the image will be stuck forever and never be deleted unless we send a clear signal.

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

Successfully merging this pull request may close these issues.

support kitty's protocol
5 participants