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:
| Priority | Protocol | Terminal sequence |
|---|---|---|
| 1 | Kitty graphics protocol | Kitty graphics commands |
| 2 | iTerm2 | OSC 1337 inline images |
| 3 | DEC Sixel | Sixel 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:
version 1
image-support #falseWith the setting off, koshi keeps the text and image placeholders, but sends no
native image bytes. See koshi.kdl.
Sessions and clients
A koshi session runs in its own process and owns the tabs, panes, and processes; terminals attach to it as clients and can leave without ending it.
Attach and detach
Leave a koshi session running, rejoin it from any terminal, watch one session from several terminals, and decide when an empty session ends.