pane title, from someone in GitHub issue 3930.
-/* $OpenBSD: input.c,v 1.223 2023/12/27 20:13:35 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.224 2024/04/10 07:36:25 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
switch (option) {
case 0:
case 2:
- if (screen_set_title(sctx->s, p) && wp != NULL) {
+ if (wp != NULL &&
+ options_get_number(wp->options, "allow-set-title") &&
+ screen_set_title(sctx->s, p)) {
notify_pane("pane-title-changed", wp);
server_redraw_window_borders(wp->window);
server_status_window(wp->window);
-/* $OpenBSD: options-table.c,v 1.170 2024/03/21 11:53:11 nicm Exp $ */
+/* $OpenBSD: options-table.c,v 1.171 2024/04/10 07:36:25 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
"to rename windows."
},
+ { .name = "allow-set-title",
+ .type = OPTIONS_TABLE_FLAG,
+ .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
+ .default_num = 1,
+ .text = "Whether applications are allowed to use the escape sequence "
+ "to set the pane title."
+ },
+
{ .name = "alternate-screen",
.type = OPTIONS_TABLE_FLAG,
.scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
-.\" $OpenBSD: tmux.1,v 1.940 2024/03/21 11:53:11 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.941 2024/04/10 07:36:25 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
.\"
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: March 21 2024 $
+.Dd $Mdocdate: April 10 2024 $
.Dt TMUX 1
.Os
.Sh NAME
Allow programs in the pane to change the window name using a terminal escape
sequence (\eek...\ee\e\e).
.Pp
+.It Xo Ic allow-set-title
+.Op Ic on | off
+.Xc
+Allow programs in the pane to change the title using the terminal escape
+sequences (\ee]2;...\ee\e\e or \ee]0;...\ee\e\e).
+.Pp
.It Xo Ic alternate-screen
.Op Ic on | off
.Xc
-/* $OpenBSD: tmux.h,v 1.1213 2024/03/21 11:30:42 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.1214 2024/04/10 07:36:25 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
struct screen_titles;
struct screen {
char *title;
- char *path;
+ char *path;
struct screen_titles *titles;
struct grid *grid; /* grid data */