How about this? Index: tmux.1 =================================================================== RCS file: /cvs/src/usr.bin/tmux/tmux.1,v retrieving revision 1.257 diff -u -p -r1.257 tmux.1 --- tmux.1 9 Dec 2011 16:28:18 -0000 1.257 +++ tmux.1 19 Dec 2011 20:34:33 -0000 @@ -2110,7 +2110,7 @@ may contain any of the following special .It Li "#I" Ta "Current window index" .It Li "#P" Ta "Current pane index" .It Li "#S" Ta "Session name" -.It Li "#T" Ta "Current window title" +.It Li "#T" Ta "Current pane title" .It Li "#W" Ta "Current window name" .It Li "##" Ta "A literal" Ql # .El @@ -2129,13 +2129,9 @@ global environment set (see the .Sx ENVIRONMENT section). .Pp -The window title (#T) is the title set by the program running within the window -using the OSC title setting sequence, for example: -.Bd -literal -offset indent -$ printf '\e033]2;My Title\e033\e\e' -.Ed -.Pp -When a window is first created, its title is the hostname. +For details on how the names and titles can be set see the +.Sx "NAMES AND TITLES" +section. .Pp #[attributes] allows a comma-separated list of attributes to be specified, these may be @@ -2654,6 +2650,59 @@ The following variables are available, w .It Li "window_name" Ta "Name of window" .It Li "window_width" Ta "Width of window" .El +.Sh NAMES AND TITLES +.Nm +distinguishes between names and titles. +Windows and sessions have names, which may be used to specify them in target +and are displayed in the status line and various lists: the name is the +.Nm +identifier for a window or session. +Only panes have titles. +A pane's title is typically set by the program running inside the pane and +is not modified by +.Nm . +It is the same mechanism used to set for example the +.Xr xterm 1 +window title in an +.Xr X 7 +window manager. +A window's title is the title of it's active pane. +.Nm +itself may set the title of the terminal in which the client is running, see +the +.Ic set-titles +option. +.Pp +A session's name is set with the +.Ic new-session +and +.Ic rename-session +commands. A window's title is set with one of: +.Bl -enum -width Ds +.It +A command argument (such as +.Fl n +for +.Ic new-window +or +.Ic new-session ) . +.It +An escape sequence: +.Bd -literal -offset indent +$ printf '\e033kWINDOW_NAME\e033\e\e' +.Ed +.It +Automatic renaming, which sets the name to the active command in the window's +active pane. +See the +.Ic automatic-rename . +.El +.Pp +When a pane is first created, its title is the hostname. +A pane's title can be set via the OSC title setting sequence, for example: +.Bd -literal -offset indent +$ printf '\e033]2;My Title\e033\e\e' +.Ed .Sh ENVIRONMENT When the server is started, .Nm @@ -2717,8 +2766,8 @@ terminal. By default, the status line is enabled (it may be disabled with the .Ic status session option) and contains, from left-to-right: the name of the current -session in square brackets; the window list; the current window title in double -quotes; and the time and date. +session in square brackets; the window list; the title of the active pane +in double quotes; and the time and date. .Pp The status line is made of three parts: configurable left and right sections (which may contain dynamic content such as the time or output from a shell
On Fri, Dec 09, 2011 at 09:14:40AM -0800, Felix Rosencrantz wrote: > I've attached a proposed patch to the man page, that updates the > details described in this thread. > > Thanks. > -FR. > > On Thu, Nov 3, 2011 at 5:19 PM, Nicholas Marriott > <nicholas.marri...@gmail.com> wrote: > > On Thu, Nov 03, 2011 at 02:57:40PM -0700, Felix Rosencrantz wrote: > >> I was having a problem where my window names were disappearing when my > >> shell > >> started, at first I was thinking the problem was related to the > >> automatic-renaming option. ?After some investigation, the problem was that > >> my > >> prompt was sending a code "\033k\033\\", which is used to clear screen's > >> title, > >> there is a note about this in the comments in input.c. > >> > >> One problem that made this difficult to track down was that the manual > >> page is > >> not very precise, and particular details are omitted. ?It's not clear to > >> me from > >> the man page that windows and panes have their own separate title/names. > >> Though here is what I think the state of tmux is: > >> ? ?Windows have names which can be set in one of three ways: > >> ? ?1) By tmux command (e.g. new-window, new-session, or rename-window) > >> ? ?2) By escape code (e.g. printf '\033kWINDOW_NAME\033\\") > >> ? ?3) Automatic renaming, which tries to be the active command in the > >> ? ? ? active pane of the window. > > > > yes this is correct > > > > personally i don't like that escape sequence, it is a gnu screen > > extension, should try to find something more sensible instead. maybe > > \033]1, not sure what xterm uses that for > > > > i'm not sure if we should document specific escape sequences, although > > if you're adding a section on naming and titles it'd make sense to cover > > these i suppose > > > >> ? ?4) Man page issues: > >> ? ? ? 1) doesn't mention escape code, and that escape code turns off > >> automatic rename > >> ? ? ? 2) automatic-renaming isn't specific about which pane is used. > >> ? ? ? 3) The status-left option mentions both a window title&name. Here > >> window > >> ? ? ? ? ?title, is actually the active pane title. > >> ? ?Panes have titles, which can be set one way: > >> ? ?1) By escape code: printf '\033]2;My Title\033\\' > > > > yes that's right > > > > title is what would typically be displayed in the xterm window title in > > a window manager > > > >> ? ?2) Man page issues: > >> ? ? ? 1) says escape code is used for "window title" > >> ? ? ? 2) The FORMATS section lists "pane_title", but otherwise not > >> mentioned in man page. > >> ? ?3) FAQ incorrectly states: * tmux panes do not have individual > >> names, titles and so on. > >> ? ?Clients have a title, used to set xterm titles, > >> ? ?1) Can only be specified by tmux command set-titles-string > >> ? ?2) Documentation issues: > >> ? ? ? 1) The man page isn't very clear set-titles-string applies to clients > >> > >> > >> I may still be confused, so would like to confirm if this correct. ?It > >> seems > >> like it would be useful if details about names&title were more precisely > >> spelled out in a separate man page section. > >> > >> -FR. > >> > >> ------------------------------------------------------------------------------ > >> RSA(R) Conference 2012 > >> Save $700 by Nov 18 > >> Register now > >> http://p.sf.net/sfu/rsa-sfdev2dev1 > >> _______________________________________________ > >> tmux-users mailing list > >> tmux-users@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/tmux-users ------------------------------------------------------------------------------ Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users