Add kittygraphics terminal feature.

This commit is contained in:
nicm
2026-10-12 12:35:03 +00:00
committed by tmux update bot
parent 4d2e4e52e8
commit b865fe844d
4 changed files with 26 additions and 12 deletions

4
tmux.1
View File

@@ -1,4 +1,4 @@
.\" $OpenBSD: tmux.1,v 1.1183 2026/10/12 12:22:42 nicm Exp $
.\" $OpenBSD: tmux.1,v 1.1184 2026/10/12 12:35:03 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
.\"
@@ -5198,6 +5198,8 @@ Ignore function keys from
and use the
.Nm
internal set only.
.It kittygraphics
Supports the Kitty graphics protocol with Unicode placeholders.
.It margins
Supports DECSLRM margins.
.It mouse

3
tmux.h
View File

@@ -1,4 +1,4 @@
/* $OpenBSD: tmux.h,v 1.1456 2026/10/12 10:39:05 nicm Exp $ */
/* $OpenBSD: tmux.h,v 1.1457 2026/10/12 12:35:03 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1730,6 +1730,7 @@ struct tty_term {
#define TERM_SIXEL 0x40
#define TERM_INVALIDMS 0x80
#define TERM_NOREPLACE 0x100
#define TERM_KITTYGRAPHICS 0x200
int flags;
LIST_ENTRY(tty_term) entry;

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: tty-features.c,v 1.47 2026/10/12 12:26:46 nicm Exp $ */
/* $OpenBSD: tty-features.c,v 1.48 2026/10/12 12:35:03 nicm Exp $ */
/*
* Copyright (c) 2020 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -359,6 +359,13 @@ static const struct tty_feature tty_feature_sixel = {
TERM_SIXEL
};
/* Terminal supports Kitty graphics Unicode placeholders. */
static const struct tty_feature tty_feature_kittygraphics = {
"kittygraphics",
NULL,
TERM_KITTYGRAPHICS
};
/* Terminal supports the OSC 9;4 progress bar. */
static const char *const tty_feature_progressbar_capabilities[] = {
"Spb=\\E]9;4;%p1%d;%p2%d\\E\\\\",
@@ -389,6 +396,7 @@ static const struct tty_feature *const tty_features[] = {
&tty_feature_extkeys,
&tty_feature_focus,
&tty_feature_ignorefkeys,
&tty_feature_kittygraphics,
&tty_feature_margins,
&tty_feature_mouse,
&tty_feature_osc7,
@@ -643,7 +651,8 @@ tty_default_features(struct client *c, const char *name, u_int version)
"osc7,"
"sync,"
"usstyle,"
"progressbar"
"progressbar,"
"kittygraphics"
},
{ .name = "kitty",
.features = TTY_FEATURES_BASE_MODERN_XTERM ","
@@ -654,7 +663,8 @@ tty_default_features(struct client *c, const char *name, u_int version)
"hyperlinks,"
"osc7,"
"sync,"
"usstyle"
"usstyle,"
"kittygraphics"
},
{ .name = "Rio",
.features = TTY_FEATURES_BASE_MODERN_XTERM ","

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: window-client.c,v 1.49 2026/08/31 12:41:03 kirill Exp $ */
/* $OpenBSD: window-client.c,v 1.50 2026/10/12 12:35:03 nicm Exp $ */
/*
* Copyright (c) 2017 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -89,19 +89,20 @@ static const char *window_client_info_lines[] = {
" #[#{E:tree-mode-border-style},acs]x#[default] "
WINDOW_CLIENT_FEATURE(hyperlinks) " "
WINDOW_CLIENT_FEATURE(ignorefkeys) " "
WINDOW_CLIENT_FEATURE(margins) " "
WINDOW_CLIENT_FEATURE(mouse),
WINDOW_CLIENT_FEATURE(kittygraphics) " "
WINDOW_CLIENT_FEATURE(margins),
" #[#{E:tree-mode-border-style},acs]x#[default] "
WINDOW_CLIENT_FEATURE(mouse) " "
WINDOW_CLIENT_FEATURE(osc7) " "
WINDOW_CLIENT_FEATURE(overline) " "
WINDOW_CLIENT_FEATURE(progressbar) " "
WINDOW_CLIENT_FEATURE(rectfill),
WINDOW_CLIENT_FEATURE(progressbar),
" #[#{E:tree-mode-border-style},acs]x#[default] "
WINDOW_CLIENT_FEATURE(rectfill) " "
WINDOW_CLIENT_FEATURE(sixel) " "
WINDOW_CLIENT_FEATURE(strikethrough) " "
WINDOW_CLIENT_FEATURE(sync) " "
WINDOW_CLIENT_FEATURE(title),
WINDOW_CLIENT_FEATURE(sync),
" #[#{E:tree-mode-border-style},acs]x#[default] "
WINDOW_CLIENT_FEATURE(title) " "
WINDOW_CLIENT_FEATURE(usstyle) " "
WINDOW_CLIENT_FEATURE(utf8),
"#[#{E:tree-mode-border-style},acs]qqqqqqqqqqqqqqn#{R:q,#{window_width}}#[default]",