KOSHI0.4.0
Using koshi
v0.4usingfield manual

Terminal images

Draw terminal images in koshi panes through Kitty, iTerm2, or Sixel, with a fallback for terminals that support none.

Programs running in a koshi pane can draw terminal images. koshi decodes the image stream, keeps the image at its cell placement, and renders it in every attached terminal that can show images.

Supported protocols

Each terminal probes its own capabilities when it attaches. koshi chooses the first supported protocol in this order:

PriorityProtocolTerminal sequence
1Kitty graphics protocolKitty graphics commands
2iTerm2OSC 1337 inline images
3DEC SixelSixel raster data

The choice belongs to the terminal, not the session. Two terminals attached to the same session can therefore use different protocols.

Image placement

Koshi keeps an image at its cell placement through scrolling, scrollback, resizing, and screen switches. A terminal that supports none of the protocols shows terminal image unavailable in the cells the image covers.

If a terminal does not answer the cell-size query, koshi uses its window pixel size to scale Sixel and iTerm2 images.

Disable native image output

Native image output is enabled by default. Set image-support in your terminal's koshi.kdl to disable it:

koshi.kdl
version 1
image-support #false

With the setting off, koshi keeps the text and image placeholders, but sends no native image bytes. See koshi.kdl.

On this page