Well, I don't much like this escape sequence but I'm not sure about
this.

What is the reason for needing this? Not many applications use this
escape sequence as far as I'm aware, surely any that do have their own
way to turn it off?


On Sat, Jan 07, 2012 at 12:09:18PM +0100, Romain Francoise wrote:
> Hi,
> 
> Over on the Debian BTS, in bug #654882, one of our users requests the
> ability to turn off the screen title setting escape sequence so that tmux
> doesn't discard a manually-set window name, ever.
> 
> Would something like the following be acceptable? Thanks.
> 
> diff --git a/input.c b/input.c
> index 17307e9..bb23580 100644
> --- a/input.c
> +++ b/input.c
> @@ -1558,6 +1558,8 @@ input_exit_rename(struct input_ctx *ictx)
>  {
>       if (ictx->flags & INPUT_DISCARD)
>               return;
> +     if (!options_get_number(&ictx->wp->window->options, "allow-rename"))
> +             return;
>       log_debug("%s: \"%s\"", __func__, ictx->input_buf);
>  
>       xfree(ictx->wp->window->name);
> diff --git a/options-table.c b/options-table.c
> index 2700536..8318780 100644
> --- a/options-table.c
> +++ b/options-table.c
> @@ -435,6 +435,11 @@ const struct options_table_entry window_options_table[] 
> = {
>         .default_num = 0
>       },
>  
> +     { .name = "allow-rename",
> +       .type = OPTIONS_TABLE_FLAG,
> +       .default_num = 1
> +     },
> +
>       { .name = "alternate-screen",
>         .type = OPTIONS_TABLE_FLAG,
>         .default_num = 1
> diff --git a/tmux.1 b/tmux.1
> index 0b8f077..6ce2edf 100644
> --- a/tmux.1
> +++ b/tmux.1
> @@ -2346,6 +2346,12 @@ this option is good for full-screen programs which 
> support
>  .Dv SIGWINCH
>  and poor for interactive programs such as shells.
>  .Pp
> +.It Xo Ic allow-rename
> +.Op Ic on | off
> +.Xc
> +Allow programs to change the window name using a terminal escape
> +sequence (\\033k...\\033\\\\). The default is on.
> +.Pp
>  .It Xo Ic alternate-screen
>  .Op Ic on | off
>  .Xc

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to