Add support for the kitty graphics protocol

Kitty-capable terminals (kitty, ghostty, and others) can display
inline images via APC escape sequences.

Kitty's image support uses a passthrough model: APC sequences from
programs running inside panes are relayed verbatim to the outer
terminal with cursor positioning adjusted for the pane offset.

The outer terminal handles all image rendering and therefore itself must
be kitty-aware.
This commit is contained in:
Thomas Adam
2026-02-28 21:14:32 +00:00
parent d9d2b2f1ee
commit cf6cbe430c
11 changed files with 608 additions and 2 deletions

View File

@@ -471,6 +471,16 @@ if test "x$enable_sixel" = xyes; then
fi
AM_CONDITIONAL(ENABLE_SIXEL, [test "x$enable_sixel" = xyes])
# Enable kitty graphics protocol support.
AC_ARG_ENABLE(
kitty,
AS_HELP_STRING(--enable-kitty, enable kitty terminal graphics protocol)
)
if test "x$enable_kitty" = xyes; then
AC_DEFINE(ENABLE_KITTY)
fi
AM_CONDITIONAL(ENABLE_KITTY, [test "x$enable_kitty" = xyes])
# Check for b64_ntop. If we have b64_ntop, we assume b64_pton as well.
AC_MSG_CHECKING(for b64_ntop)
AC_LINK_IFELSE([AC_LANG_PROGRAM(