Pictures
eterm speaks the kitty graphics protocol,
which is how a program puts an image in the terminal instead of blocks of colour:
kitty +kitten icat, chafa, timg, viu, the previews in yazi and
ranger, plots from matplotlib backends and gnuplot.
A picture goes where the cursor was when it arrived, covering as many cells as
its pixels need, or as many as the program asked for. It scrolls with the text
around it and stays in the scrollback. One drawn by a full-screen program goes
when that program leaves, as the rest of what it drew there does. cmd-k
clears pictures along with the text.
What is understood
- Sending a picture at once or in chunks, directly or as a file the program names — and the protocol's own temporary files are removed once read
- PNG, and raw RGB or RGBA pixels, either of them zlib-compressed
- A size in cells, or one of the two with the other kept in proportion
- Placing a picture sent before, by its id; taking pictures away by id or all at once
- The query programs use to find out whether pictures work at all, and the answers they wait for
What is not, yet
- Shared memory as a way of sending, which programs fall back from
- Animation, cropping, pixel offsets inside a cell, and pictures placed under the text
- Unicode placeholders, which is how pictures get through tmux
- Pictures are not drawn while a block is folded
Nothing here runs a program or reads a file the program could not read itself.