wookayin / python-imgcat

🖼 imgcat in Python (for iTerm2)
MIT License
244 stars 20 forks source link

support kitty's protocol #4

Open teto opened 4 years ago

teto commented 4 years ago

wow that looks dope, would it be possible to support kitty (a cross platform python terminal) as well ? it seems to have its own format too https://sw.kovidgoyal.net/kitty/graphics-protocol.html (the link provides a python function to use the protocol).

Another implementation reference could be: https://pypi.org/project/pixcat/#description

wookayin commented 4 years ago

Yes, I plan to support kitty and sixel protocols so that it can work with another terminal emulators than iTerm2. Stay tuned!

wookayin commented 4 years ago

tmux is very stubborn against supporting image display (either in iTerm2 or kitty). Unfortunately, there is no way to display images inside tmux. See: https://github.com/kovidgoyal/kitty/issues/413

wookayin commented 4 years ago

Using a very complicated tmux passthrough sequence, I managed to make images rendered on kitty, but there is some bugs on clearing up graphics. See kitty#2457 for details.

teto commented 4 years ago

I dont use tmux much, would that work better without tmux on a plain kitty ?

wookayin commented 4 years ago

@teto Yes I agree, will push an early version (without or with tmux) soon.

davvid commented 6 months ago

tmux has a passthrough option these days. It makes images display fine inside of tmux inside kitty:

# .tmux.conf
set -gq allow-passthrough on