sclack icon indicating copy to clipboard operation
sclack copied to clipboard

Support iTerm2 image escape sequences

Open keegancsmith opened this issue 6 years ago • 2 comments

iTerm2 has extended the xterm protocol to support embedding images in the terminal. This seems like a great use in sclack if supported, instead of ANSI/VT100 rendering. https://www.iterm2.com/documentation-images.html

keegancsmith avatar Aug 07 '18 19:08 keegancsmith

Yesterday I've been playing around with imgcat. It seems really easy to integrate in non-interactive interfaces or interactive interfaces that use the native ANSI escape codes of the terminal. Urwid is a bit specific. As long as I've searched, a custom widget using escape codes would need to use the urwid.Terminal widget as base, which provides its own parser for ANSI escapes, so buffering the output of imgcat and unbuffering inside a Urwid box doesn't render things like they should. I'll take a deeper look in the protocol the check the possibilities.

haskellcamargo avatar Aug 08 '18 12:08 haskellcamargo

You might want to checkout tiv https://github.com/stefanhaustein/TerminalImageViewer. I think its output looks better than imgcat's

d0c-s4vage avatar Sep 23 '20 14:09 d0c-s4vage