diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2018-08-20 15:22:14 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2018-08-20 15:22:14 +0100 |
commit | 641191ab2047d1437d46dc0ae787346b74fddca5 (patch) | |
tree | 21844a1ed3a4b3bc987f8d967457d74f10c888d5 /tmux.1 | |
parent | bf03197e185b8f274fa6681fbaf6d4237c2bfe4f (diff) | |
download | rtmux-641191ab2047d1437d46dc0ae787346b74fddca5.tar.gz rtmux-641191ab2047d1437d46dc0ae787346b74fddca5.tar.bz2 rtmux-641191ab2047d1437d46dc0ae787346b74fddca5.zip |
Support for windows larger than the client.
This adds two new options, window-size and default-size, and a new
command, resize-window.
The force-width and force-height options, and the session_width and
session_height formats have been removed.
The new window-size option tells tmux how to work out the size of
windows: largest means it picks the size of the largest session,
smallest the smallest session (similar to the old behaviour) and
manual means that it does not automatically resize
windows. aggressive-resize modifies the choice of session for largest
and smallest as it did before.
If a window is in a session attached to a client that is too small,
only part of the window is shown. tmux attempts to keep the cursor
visible, so the part of the window displayed is changed as the cursor
moves (with a small delay, to try and avoid excess redrawing when
applications redraw status lines or similar that are not currently
visible).
Drawing windows which are larger than the client is not as efficient
as those which fit, particularly when the cursor moves, so it is
recommended to avoid using this on slow machines or networks (set
window-size to smallest or manual).
The resize-window command can be used to resize a window manually. If
it is used, the window-size option is automatically set to manual for
the window (undo this with "setw -u window-size"). resize-window works
in a similar way to resize-pane (-U -D -L -R -x -y flags) but also has
-a and -A flags. -a sets the window to the size of the smallest client
(what it would be if window-size was smallest) and -A the largest.
For the same behaviour as force-width or force-height, use
resize-width -x or -y.
If the global window-size option is set to manual, the default-size
option is used for new windows. If -x or -y is used with new-session,
that sets the default-size option for the new session.
The maximum size of a window is 10000x10000. But expect applications
to complain and higher memory use if you make a window that big. The
minimum size is the size required for the current layout including
borders.
This change allows some code improvements, most notably that since
windows can now never be cropped, that code can be removed from the
layout code, and since panes can now never be outside the size of the
window, window_pane_visible can be removed.
Diffstat (limited to 'tmux.1')
-rw-r--r-- | tmux.1 | 104 |
1 files changed, 85 insertions, 19 deletions
@@ -628,13 +628,13 @@ refers to a .Nm command, passed with the command and arguments separately, for example: .Bd -literal -offset indent -bind-key F1 set-window-option force-width 81 +bind-key F1 set-window-option synchronize-panes on .Ed .Pp Or if using .Xr sh 1 : .Bd -literal -offset indent -$ tmux bind-key F1 set-window-option force-width 81 +$ tmux bind-key F1 set-window-option synchronize-panes on .Ed .Pp Multiple commands may be specified together as part of a @@ -850,13 +850,22 @@ and are the name of and shell command to execute in the initial window. With .Fl d , -the initial size is 80 x 24; +the initial size comes from the global +.Ar default-size +option; .Fl x and .Fl y can be used to specify a different size. .Ql - uses the size of the current client if any. +If +.Fl x +or +.Fl y +is given, the +.Ar default-size +option is set for the session. .Pp If run from a terminal, any .Xr termios 4 @@ -1916,6 +1925,40 @@ and unzoomed (its normal position in the layout). .Fl M begins mouse resizing (only valid if bound to a mouse key binding, see .Sx MOUSE SUPPORT ) . +.It Xo Ic resize-window +.Op Fl aADLU +.Op Fl t Ar target-window +.Op Fl x Ar width +.Op Fl y Ar height +.Op Ar adjustment +.Xc +.D1 (alias: Ic resizew ) +Resize a window, up, down, left or right by +.Ar adjustment +with +.Fl U , +.Fl D , +.Fl L +or +.Fl R , +to an absolute size +with +.Fl x +or +.Fl y , +or to the size of the smallest or largest session (with +.Fl a +or +.Fl A ) . +The +.Ar adjustment +is given in lines or cells (the default is 1). +.Pp +This command automatically sets the +.Ic window-size +option to +.Ar manual +for the window. .It Xo Ic respawn-pane .Op Fl c Ar start-directory .Op Fl k @@ -2659,6 +2702,16 @@ The default is an empty string, which instructs to create a login shell using the value of the .Ic default-shell option. +.It Ic default-size Ar XxY +Set the default size of new windows when the +.Ar window-size +option is set to manual or when a session is created with +.Ic new-session +.Fl d . +The value is the width and height separated by an +.Ql x +character. +The default is 80x24. .It Ic default-shell Ar path Specify the default shell. This is used as the login shell for new windows when the @@ -3055,10 +3108,13 @@ Supported window options are: Aggressively resize the chosen window. This means that .Nm -will resize the window to the size of the smallest session for which it is the -current window, rather than the smallest session to which it is attached. -The window may resize when the current window is changed on another sessions; -this option is good for full-screen programs which support +will resize the window to the size of the smallest or largest session +(see the +.Ic window-size +option) for which it is the current window, rather than the session to +which it is attached. +The window may resize when the current window is changed on another +session; this option is good for full-screen programs which support .Dv SIGWINCH and poor for interactive programs such as shells. .Pp @@ -3121,16 +3177,6 @@ Set clock colour. .Xc Set clock hour format. .Pp -.It Ic force-height Ar height -.It Ic force-width Ar width -Prevent -.Nm -from resizing a window to greater than -.Ar width -or -.Ar height . -A value of zero restores the default unlimited setting. -.Pp .It Ic main-pane-height Ar height .It Ic main-pane-width Ar width Set the width or height of the main (left or top) pane in the @@ -3310,6 +3356,28 @@ see the .Ic message-command-style option. .Pp +.It Xo Ic Ic window-size +.Ar largest | Ar smallest | Ar manual +.Xc +Configure how +.Nm +determines the window size. +If set to +.Ar largest , +the size of the largest attached session is used; if +.Ar smallest , +the size of the smallest. +If +.Ar manual , +the size of a new window is set from the +.Ic default-size +option and windows are resized automatically. +See also the +.Ic resize-window +command and the +.Ic aggressive-resize +option. +.Pp .It Ic window-style Ar style Set the default window style. For how to specify @@ -3801,12 +3869,10 @@ The following variables are available, where appropriate: .It Li "session_group_size" Ta "" Ta "Size of session group" .It Li "session_group_list" Ta "" Ta "List of sessions in group" .It Li "session_grouped" Ta "" Ta "1 if session in a group" -.It Li "session_height" Ta "" Ta "Height of session" .It Li "session_id" Ta "" Ta "Unique session ID" .It Li "session_many_attached" Ta "" Ta "1 if multiple clients attached" .It Li "session_name" Ta "#S" Ta "Name of session" .It Li "session_stack" Ta "" Ta "Window indexes in most recent order" -.It Li "session_width" Ta "" Ta "Width of session" .It Li "session_windows" Ta "" Ta "Number of windows in session" .It Li "socket_path" Ta "" Ta "Server socket path" .It Li "start_time" Ta "" Ta "Server start time" |