From 7ed78a31debb0250bae16d8b4098a4689f29bb60 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Thu, 15 Oct 2026 12:30:14 +0300 Subject: Take the terminal name from term_options.name The core hard-coded "wsap_term" for XTVERSION, the XTGETTCAP TN and name default, and the OSC 9 notification title. A headless library should take its identity from the host. term_options.name sets the name. NULL or "" selects "term". term_new() copies it and returns NULL unless it is 1 to 63 printable ASCII bytes, since DCS replies echo it. A DCS +p still changes the TN value, and the XTVERSION and notification defaults keep the host name. Co-Authored-By: Claude Haiku 5.5 --- include/term/term.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/term/term.h b/include/term/term.h index dc41114..aa1a3d7 100644 --- a/include/term/term.h +++ b/include/term/term.h @@ -146,6 +146,13 @@ struct term_options { struct term_theme theme; enum term_cursor_style cursor_style; bool cursor_steady; /* false: the cursor blinks */ + /* + * The terminal's name. Programs read it with XTVERSION and XTGETTCAP. + * It is also the title of a notification that has none. NULL or "" + * selects "term". Otherwise 1 to 63 printable ASCII bytes, or term_new() + * returns NULL. term_new() copies the name. + */ + const char *name; struct term_callbacks callbacks; }; -- cgit v1.2.3