mirror of
https://github.com/tmux/tmux.git
synced 2025-01-07 16:28:48 +00:00
Add selectp -T to set pane title.
This commit is contained in:
parent
6abfd9b8ff
commit
f4848b437f
@ -30,8 +30,8 @@ const struct cmd_entry cmd_select_pane_entry = {
|
|||||||
.name = "select-pane",
|
.name = "select-pane",
|
||||||
.alias = "selectp",
|
.alias = "selectp",
|
||||||
|
|
||||||
.args = { "DdegLlMmP:Rt:U", 0, 0 },
|
.args = { "DdegLlMmP:RT:t:U", 0, 0 },
|
||||||
.usage = "[-DdegLlMmRU] [-P style] " CMD_TARGET_PANE_USAGE,
|
.usage = "[-DdegLlMmRU] [-P style] [-T title] " CMD_TARGET_PANE_USAGE,
|
||||||
|
|
||||||
.target = { 't', CMD_FIND_PANE, 0 },
|
.target = { 't', CMD_FIND_PANE, 0 },
|
||||||
|
|
||||||
@ -147,6 +147,11 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
return (CMD_RETURN_NORMAL);
|
return (CMD_RETURN_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (args_has(self->args, 'T')) {
|
||||||
|
screen_set_title(&wp->base, args_get(self->args, 'T'));
|
||||||
|
server_status_window(wp->window);
|
||||||
|
}
|
||||||
|
|
||||||
if (wp == w->active)
|
if (wp == w->active)
|
||||||
return (CMD_RETURN_NORMAL);
|
return (CMD_RETURN_NORMAL);
|
||||||
server_unzoom_window(wp->window);
|
server_unzoom_window(wp->window);
|
||||||
|
22
tmux.1
22
tmux.1
@ -1923,6 +1923,7 @@ applies the last set layout if possible (undoes the most recent layout change).
|
|||||||
.It Xo Ic select-pane
|
.It Xo Ic select-pane
|
||||||
.Op Fl DdegLlMmRU
|
.Op Fl DdegLlMmRU
|
||||||
.Op Fl P Ar style
|
.Op Fl P Ar style
|
||||||
|
.Op Fl T Ar title
|
||||||
.Op Fl t Ar target-pane
|
.Op Fl t Ar target-pane
|
||||||
.Xc
|
.Xc
|
||||||
.D1 (alias: Ic selectp )
|
.D1 (alias: Ic selectp )
|
||||||
@ -1978,6 +1979,9 @@ select-pane -t:.1 -P 'bg=red'
|
|||||||
.Pp
|
.Pp
|
||||||
.Fl g
|
.Fl g
|
||||||
shows the current pane style.
|
shows the current pane style.
|
||||||
|
.Pp
|
||||||
|
.Fl T
|
||||||
|
sets the pane title.
|
||||||
.It Xo Ic select-window
|
.It Xo Ic select-window
|
||||||
.Op Fl lnpT
|
.Op Fl lnpT
|
||||||
.Op Fl t Ar target-window
|
.Op Fl t Ar target-window
|
||||||
@ -2874,7 +2878,7 @@ Set the position of the status line.
|
|||||||
Display
|
Display
|
||||||
.Ar string
|
.Ar string
|
||||||
to the right of the status line.
|
to the right of the status line.
|
||||||
By default, the current window title in double quotes, the date and the time
|
By default, the current pane title in double quotes, the date and the time
|
||||||
are shown.
|
are shown.
|
||||||
As with
|
As with
|
||||||
.Ic status-left ,
|
.Ic status-left ,
|
||||||
@ -3722,14 +3726,11 @@ and are displayed in the status line and various lists: the name is the
|
|||||||
.Nm
|
.Nm
|
||||||
identifier for a window or session.
|
identifier for a window or session.
|
||||||
Only panes have titles.
|
Only panes have titles.
|
||||||
A pane's title is typically set by the program running inside the pane and
|
A pane's title is typically set by the program running inside the pane using
|
||||||
is not modified by
|
an escape sequence (like it would set the
|
||||||
.Nm .
|
|
||||||
It is the same mechanism used to set for example the
|
|
||||||
.Xr xterm 1
|
.Xr xterm 1
|
||||||
window title in an
|
window title in
|
||||||
.Xr X 7
|
.Xr X 7 Ns ).
|
||||||
window manager.
|
|
||||||
Windows themselves do not have titles - a window's title is the title of its
|
Windows themselves do not have titles - a window's title is the title of its
|
||||||
active pane.
|
active pane.
|
||||||
.Nm
|
.Nm
|
||||||
@ -3770,6 +3771,11 @@ A pane's title can be set via the OSC title setting sequence, for example:
|
|||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
$ printf '\e033]2;My Title\e033\e\e'
|
$ printf '\e033]2;My Title\e033\e\e'
|
||||||
.Ed
|
.Ed
|
||||||
|
.Pp
|
||||||
|
It can also be modified with the
|
||||||
|
.Ic select-pane
|
||||||
|
.Fl T
|
||||||
|
command.
|
||||||
.Sh ENVIRONMENT
|
.Sh ENVIRONMENT
|
||||||
When the server is started,
|
When the server is started,
|
||||||
.Nm
|
.Nm
|
||||||
|
Loading…
Reference in New Issue
Block a user