mirror of
https://github.com/tmux/tmux.git
synced 2026-03-07 00:05:33 +00:00
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:
14
format.c
14
format.c
@@ -2571,6 +2571,17 @@ format_cb_sixel_support(__unused struct format_tree *ft)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Callback for kitty_support. */
|
||||
static void *
|
||||
format_cb_kitty_support(__unused struct format_tree *ft)
|
||||
{
|
||||
#ifdef ENABLE_KITTY
|
||||
return (xstrdup("1"));
|
||||
#else
|
||||
return (xstrdup("0"));
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Callback for active_window_index. */
|
||||
static void *
|
||||
format_cb_active_window_index(struct format_tree *ft)
|
||||
@@ -3469,6 +3480,9 @@ static const struct format_table_entry format_table[] = {
|
||||
{ "sixel_support", FORMAT_TABLE_STRING,
|
||||
format_cb_sixel_support
|
||||
},
|
||||
{ "kitty_support", FORMAT_TABLE_STRING,
|
||||
format_cb_kitty_support
|
||||
},
|
||||
{ "socket_path", FORMAT_TABLE_STRING,
|
||||
format_cb_socket_path
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user