Add support for Kitty's Terminal graphics protocol #320
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While the added support for sixel on #295 is a neat addition, there are many terminals that do not support it. Kitty is one of them. It supports its own procol for terminal graphics. This PR adds support for that protocol to rainbowstream.
For it to work, you have to be on a Kitty terminal and
IMAGE_ON_TERM
must be set toTrue
. If it is set toTrue
, but you are not on Kitty, it will follow the default ASCII display. If it is set tosixel
, it won't work on Kitty because it doesn't support it.Put of the #295 was moved higher up because a couple of variables were being used on both Kitty and Sixel.
It uses a package called
pixcat
that has been added to thesetup.py
file.Tested with Kitty and other terminals on Linux.