Hacker News new | ask | show | jobs
by kps 1131 days ago
Yes, every xterm-compatible should have them.

You just send the particular query (e.g. ‘CSI 14 t’) and the terminal sends back a response in the defined form¹. Of course you'll want raw mode, echo off, etc. Normally a library like curses does this for you. If you want to see, https://gist.github.com/kpschoedel/6a87ec2157ce2140be69193d1... (I just whipped this up to answer the question; don't expect production quality)

¹ https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-F...

1 comments

Thank you so much! I will incorporate this to my sixel feature branch of a tui matrix client. Memes in the terminal!
Which matrix console client? I only know gomuks and I really miss proper image support there.
https://github.com/ulyssa/iamb

It's still in the early phase of development, but actually fully functional.