term-image icon indicating copy to clipboard operation
term-image copied to clipboard

Kitty terminal graphics support

Open AnonymouX47 opened this issue 3 years ago • 8 comments

A branch off #23

Tested terminal emulators:

  • Fully working in Kitty >= 0.20.0.
  • Fully working in Konsole >= 22.04.0.
  • Tried Wezterm but not yet working, whether the stable or the nightly build as its implementation of the protocol is still really non-compliant and inconsistent with crucial aspects of the specification.

Progress:

  • [x] Sizing
  • [x] Rendering
    • [x] Line-by-line
    • [x] Whole image
  • [x] Transparency
  • [x] Formatting
  • [x] Animation
  • [x] CLI Integration
  • [x] TUI Integration
  • [x] Tests

Specific protocol features already or to be in use:

  • [x] RGB pixel data
  • [x] RGBA pixel data
  • [x] column and row image size
  • [x] z-index
  • [ ] Image ID
  • [ ] Animation (currently manually handled using term_image.image.ImageIterator for now)
  • [ ] Virtual placements

AnonymouX47 avatar May 09 '22 02:05 AnonymouX47

Initial implementation currently ongoing at #39

AnonymouX47 avatar May 09 '22 02:05 AnonymouX47

Initial implementation done! Moving on to z-index feature implementation.

Will require extending the format specification (adding a style-specific portion) and the draw() method.

AnonymouX47 avatar May 26 '22 22:05 AnonymouX47

The most recent release of kitty supports tmux!

jarbus avatar Apr 16 '23 20:04 jarbus

Thanks so much. :smiley:

I also just found out about it yesterday. I'll add it to the list of tasks above and hopefully, support can be added before the next release but at the moment, there are a few more pressing issues.

I was thinking about it yesterday and virtual placements potentially have even more usefulness (and advantages over real placements) than just the tmux use case but one major disadvantage, they can only be individually deleted by id.

Anyways, I have to figure out a good way to implement support for IDs first... in particular, automatic ID allocation, which is rather complicated since the ID namespace is global and collisions with other software running in the terminal emulator must be avoided.

AnonymouX47 avatar Apr 16 '23 20:04 AnonymouX47

By the way, implementing support for tmux passthrough is a separate thing. I think an issue had been opened in the past but it didn't seem hopeful then. I guess I'll reopen the issue.

AnonymouX47 avatar Apr 16 '23 21:04 AnonymouX47