Commit Graph

178 Commits (b74b047730226a64a64b1e1dd1cc1d7f3305ea53)

Author SHA1 Message Date
Nicholas Marriott 641191ab20 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.
2018-08-20 15:22:14 +01:00
Thomas Adam d24bd7394d Merge branch 'obsd-master' 2018-04-23 17:02:32 +01:00
nicm d9d2f84a4b Add KRB5CCNAME to update-environment. 2018-04-23 14:03:06 +00:00
Thomas Adam c2aa40449c Merge branch 'obsd-master' 2018-02-22 12:02:31 +00:00
nicm 623f4b12d3 Add exit-empty option to exit server if no sessions (defaults to on). 2018-02-22 10:54:51 +00:00
Thomas Adam 0072bc65e6 Merge branch 'obsd-master' 2017-10-25 16:01:22 +01:00
nicm 578a63bbc9 Default allow-rename to off because it is ridiculous that applications
are even able to do this and confusing when they do.
2017-10-25 14:14:52 +00:00
Thomas Adam 07a13697e1 Merge branch 'obsd-master' 2017-08-17 12:01:17 +01:00
nicm 8daa1d5f54 Add monitor-bell window option to match the activity and silence
options, from Brad Town.
2017-08-17 08:37:38 +00:00
Thomas Adam 2103a09430 Merge branch 'obsd-master' 2017-08-16 14:01:15 +01:00
nicm c1ec28a34b Rename BELL_* values to ALERT_* now they are used by more than bells,
based on a diff from Brad Town.
2017-08-16 11:46:08 +00:00
Thomas Adam 58744de3eb Merge branch 'obsd-master' 2017-07-26 18:01:16 +01:00
nicm 76887b1d27 Make bell, activity and silence alerting more consistent:
- remove the bell-on-alert option;

- add activity-action and silence-action options with the same possible
  values as the existing bell-action;

- add "both" value for the visual-bell, visual-activity and
  visual-silence options to trigger both a bell and a message.

This means all three work the same way. Based on changes from Yvain Thonnart.
2017-07-26 16:14:08 +00:00
Thomas Adam 6995497e5b Merge branch 'obsd-master' 2017-06-23 18:01:11 +01:00
nicm 95ed7d48c8 Add user-keys option to allow user-defined keys to be set, from Dan
Aloni.
2017-06-23 15:36:52 +00:00
Thomas Adam 757eb060cd Merge branch 'obsd-master' 2017-06-03 20:01:10 +01:00
nicm 3442066054 Make set-clipboard a three-state option so tmux itself can ignore the
sequencess.
2017-06-03 17:43:01 +00:00
Thomas Adam f17ecaa495 Merge branch 'obsd-master'
Conflicts:
	Makefile.am
	cfg.c
	server-client.c
2017-05-31 15:56:13 +01:00
nicm aad4e4ddb1 Rewrite of choose mode, both to simplify and tidy the code and to add
some modern features.

Now the common code is in mode-tree.c, which provides an API used by the
three modes now separated into window-{buffer,client,tree}.c. Buffer
mode shows buffers, client mode clients and tree mode a tree of
sessions, windows and panes.

Each mode has a common set of key bindings plus a few that are specific
to the mode. Other changes are:

- each mode has a preview pane: for buffers this is the buffer content
  (very useful), for others it is a preview of the pane;

- items may be sorted in different ways ('O' key);

- multiple items may be tagged and an operation applied to all of them
  (for example, to delete multiple buffers at once);

- in tree mode a command may be run on the selected item (session,
  window, pane) or on tagged items (key ':');

- displayed items may be filtered in tree mode by using a format (this
  is used to implement find-window) (key 'f');

- the custom format (-F) for the display is no longer available;

- shortcut keys change from 0-9, a-z, A-Z which was always a bit weird
  with keys used for other uses to 0-9, M-a to M-z.

Now that the code is simpler, other improvements will come later.

Primary key bindings for each mode are documented under the commands in
the man page (choose-buffer, choose-client, choose-tree).

Parts written by Thomas Adam.
2017-05-30 21:44:59 +00:00
Thomas Adam 0d073907b5 Merge branch 'obsd-master' 2017-05-30 00:01:14 +01:00
nicm b95e5827c1 Store a copy of the old status line, will be needed soon for new choose mode. 2017-05-29 20:41:29 +00:00
Thomas Adam 418ab1a553 Merge branch 'obsd-master' 2017-01-24 22:01:13 +00:00
nicm 4b2821ff98 Make update-environment an array as well. 2017-01-24 20:15:32 +00:00
nicm b77dd75b57 Convert terminal-overrides to an array option. 2017-01-24 20:05:15 +00:00
nicm 126d364abe server-info can become an alias rather than a command. 2017-01-24 19:59:19 +00:00
nicm ef15b4195f Revert WIP parts of previous I didn't mean to commit yet. 2017-01-16 14:52:25 +00:00
nicm 68db958477 getopt() has a struct option so just return to using options_entry. 2017-01-16 14:49:14 +00:00
Thomas Adam c9fcb76651 Merge branch 'obsd-master' 2017-01-15 22:01:11 +00:00
nicm 2b0bc9f1c5 Major tidy up and rework of options tree and set-option/show-options
commands this pushes more of the code into options.c and ties it more
closely to the options table rather than having an unnecessary
split. Also add support for array options (will be used later). Only
(intentional) user visible change is that show-options output is now
passed through vis(3) with VIS_DQ so quotes are escaped.
2017-01-15 20:48:41 +00:00
nicm 404214b0ac Remove unused quiet option. 2017-01-15 20:16:22 +00:00
Thomas Adam d4cb178249 Merge branch 'obsd-master' 2017-01-12 16:01:13 +00:00
nicm 24cba5907b Simplify appending to string options. 2017-01-12 15:36:35 +00:00
Thomas Adam 0d19d78fff Merge branch 'obsd-master' 2017-01-11 16:01:16 +00:00
nicm 458b6eb600 Some tidying and tweaks to options code. 2017-01-11 14:56:44 +00:00
Thomas Adam f5c5847788 Merge branch 'obsd-master' 2016-12-30 16:01:15 +00:00
nicm 1015b124d5 Change the xterm-keys option to default to on, so that tmux will
generate xterm(1) escape sequences for function keys with modifiers.

With the option off most of these keys are ignored by default, except
for ctrl + arrows which use a variant that nothing else seems to use and
I don't remember why we chose. The xterm escape sequences are now the
most common.

Prompted by a question from mpi@.
2016-12-30 13:49:34 +00:00
Thomas Adam a7ce19347a Merge branch 'obsd-master' 2016-10-14 00:01:13 +01:00
nicm 7a1a01feef Remove the set-remain-on-exit option, it was always a hack and can now
be done with hooks instead.
2016-10-13 21:37:03 +00:00
Thomas Adam 4740ecbeae Merge branch 'obsd-master' 2016-10-04 02:01:11 +01:00
nicm 1b31d148c9 Remove some dead code in cmd-move-window.c and make a load of local
functions static.
2016-10-03 22:52:11 +00:00
Thomas Adam f4648c1ca1 Merge branch 'obsd-master' 2016-05-05 00:01:11 +01:00
nicm 9f045787a5 Fix up a couple of long lines. 2016-05-04 21:29:47 +00:00
Thomas Adam 55d472a9fe Merge branch 'obsd-master' 2016-04-29 18:01:09 +01:00
nicm 0509be0740 Add option to include status text in the pane borders. If
pane-border-status is set to "top" or "bottom" (rather than "off"),
every pane has a permanent top or bottom border containing the text from
pane-border-format.

Based on a diff sent long ago by Jonathan Slenders, mostly rewritten and
simplified by me.
2016-04-29 15:00:48 +00:00
Thomas Adam dc42c35f1f Merge branch 'obsd-master' 2016-01-19 18:01:15 +00:00
nicm 995af0e2b7 I no longer use my SourceForge address so replace it. 2016-01-19 15:59:12 +00:00
Thomas Adam 845a664bb2 Merge branch 'obsd-master' 2015-12-12 20:01:15 +00:00
nicm 5ed17e84fa Add key-table option to set the default key table for a session, allows
different key bindings for different sessions and a few other things.
2015-12-12 18:32:24 +00:00
Thomas Adam 534f9e3ab1 Merge branch 'obsd-master' 2015-11-24 10:01:13 +00:00
nicm b32ce34cf2 Don't allow options in table without scope set. 2015-11-24 09:34:55 +00:00