All releases

3 min read

v0.6.0

Experimental Kitty graphics support, prefix-free window cycling in terminal mode, and a real terminal cursor with vi-mode shapes.

GGGaurav Gosain

24 commits between v0.5.0 and v0.6.0, counting the v0.5.1 patch. Seven are about one feature, kitty graphics: a program in a window can now show images through the host terminal. It ships as experimental. The rest:

  • Window cycling in terminal mode without the prefix key.
  • A real terminal cursor, so vi-mode cursor shapes work.
  • Compatibility fixes, several of them contributed.

Images, experimentally

tuios redraws each window's content into its own grid, so an image cannot pass through as is: its graphics commands carry positions that mean nothing to the host terminal. tuios now translates them.

  • The VT emulator reads the graphics commands, tuios tracks each placement against its window, and forwards it to the host at the right cell.
  • A placement is moved when its window moves, resizes or scrolls, and hidden when it is covered, dragged, or scrolled out of view.
  • Shared memory, file and direct transmission all work, with chunking for large images.
  • Cell pixel sizes are reported to the PTY, so programs size images correctly.

yazi and kitty icat show real images in tuios windows on a host terminal that supports them: Kitty, WezTerm, Ghostty, iTerm2, Foot or Contour.

Five fixes followed the feature in this cycle: clipping at window borders, placements drifting against scrollback, image ID collisions between windows, images left behind when a program leaves the alternate screen, and virtual placements that assumed a placeholder grid tuios did not have. More edges were found later.

Known limits

  • TUIOS_KITTY_GRAPHICS=0 turns graphics off.
  • Images wider than the viewport are hidden rather than clipped.
  • Sixel is parsed but disabled until raster clipping exists.

Graphics detection by asking

tuios used to guess graphics support from the terminal's name. Now it asks.

  • A DA1 query detects sixel, and the kitty graphics query detects the kitty protocol.
  • Reads poll with a timeout, so a terminal that never answers cannot hang startup.
  • TUIOS_DEBUG_CAPS=1 logs what detection found. TUIOS_KITTY_GRAPHICS and TUIOS_SIXEL_GRAPHICS override it either way.

Cycling without the prefix

Window management used to be three keys away in terminal mode. Now it is one:

  • macOS: Opt+Tab and Opt+Shift+Tab cycle windows.
  • Linux and Windows: Alt+N and Alt+P, because Alt+Tab belongs to the OS window switcher.
  • Opt+Esc or Alt+Esc leaves terminal mode.

The bindings live in a new [keybindings.terminal_mode] section and show in the help menu. This part of the release was contributed.

A real cursor

tuios used to paint its own cursor, a cyan block drawn into the grid. It now moves and styles the real terminal cursor, so cursor shape sequences from programs pass through. A shell in vi mode shows a block in normal mode and a bar in insert mode, blinking included.

Fixed

  • Paste works in daemon mode. Pasted text was written into the internal pipe whose responses are discarded, so it vanished.
  • Arrow keys work in cmus and other ncurses programs. Programs that turn on application cursor keys mode now get SS3 sequences instead of CSI.
  • Fast scrollback no longer crashes in colour comparison. Claude Code's output was fast enough to trigger it. Contributed.
  • tuios builds on FreeBSD and OpenBSD.
  • macOS terminal handling is split from Linux, because the shared ioctl constants were Linux-only.
  • --hide-clock and --window-title-position survive opening new windows instead of being overwritten by the config loader. These two shipped as v0.5.1.
  • Animation bookkeeping is skipped when nothing is animating.

Graphics stayed experimental well past this release, with horizontal clipping and sixel still open. TUIOS_KITTY_GRAPHICS=0 restores the old behaviour.