Skip to content

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

Sorry, something went wrong.

@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.

@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.

`imgcat.clear()` (or `imgcat --clear` in CLI) can be used to clear up
all remaining graphics artifacts (e.g., in kitty).
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