-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ANSI sequences #119
Comments
I tried using the terminal as in:
But got this error:
|
Agreed, also I'd love to not put ansi stuff like this in the file, but have lookatme (a plugin?) do it for me, we may need to add some size constraints in some way, to ensure the image fits correctly.. |
Hmm, the last time I looked into this was to try to get imgcat (and similar tools) to display images correctly. Back then the recommended way was to translate the ANSI sequences into urwid text markup. All other suggestions had to do with printing the ANSI sequences in an embedded terminal, which urwid then would directly translate for you (not my favorite idea). This wouldn't work with iTerm though, because it needs to directly receive the ANSI sequences (https://iterm2.com/documentation-images.html) HOWEVER it seems like there's a better way (urwid/urwid#177 (comment)) that uses a custom widget (https://github.com/kpj/pdftty/blob/master/pdftty/ansi_widget.py) to directly send the ANSI sequences to the terminal, which is what we would need to make use of iTerm's image rendering feature. Thank you @kpj for sharing this approach! I think building on/adapting @kpj's ANSIWidget class inside an iterm-specific lookatme extension could be a good approach. |
Since ueberzug is not working on MacOS, I though about using iterm support for rendering images via ANSI sequences as explained here
I tried it on lookatme but does not work. Simple ANSI sequences such as
\x1b[1;31mFOO
don't work neither. I think it would be great to support ANSI sequences to introduce color and imagesThanks!
The text was updated successfully, but these errors were encountered: