Commit Graph

55 Commits

Author SHA1 Message Date
nicm
bf635e7741 Rewrite of tmux mouse support which was a mess. Instead of having
options for "mouse-this" and "mouse-that", mouse events may be bound as
keys and there is one option "mouse" that turns on mouse support
entirely (set -g mouse on).

See the new MOUSE SUPPORT section of the man page for description of the
key names and new flags (-t= to specify the pane or window under mouse
as a target, and send-keys -M to pass through a mouse event).

The default builtin bindings for the mouse are:

    bind -n   MouseDown1Pane select-pane -t=; send-keys -M
    bind -n MouseDown1Status select-window -t=
    bind -n   MouseDrag1Pane copy-mode -M
    bind -n MouseDrag1Border resize-pane -M

To get the effect of turning mode-mouse off, do:

    unbind -n MouseDrag1Pane
    unbind -temacs-copy MouseDrag1Pane

The old mouse options are now gone, set-option -q may be used to
suppress warnings if mixing configuration files.
2015-04-19 21:34:21 +00:00
nicm
ee123c2489 Support setting the default window and pane background colours (window
and active pane via window-style and window-active-style options, an
individual pane by a new select-pane -P flag). From J Raynor.
2015-04-19 21:05:27 +00:00
nicm
83a8e1fd20 Move pane border options to window options rather than session, from Marc Finet. 2015-02-06 15:09:34 +00:00
sthen
c38f0d85da In options-table.c r1.51 an extra space was added to the default status-right,
overrunning status-right-length with long window titles. Allow for the extra
space so the last digit of the year isn't lost.  ok nicm@
2015-01-21 12:20:56 +00:00
nicm
d24c9d7d3e Do not put a space between status-left/status-right and the window list,
instead move the space into the defaults for the options (so status-left
now defaults to "[#S] ". From Balazs Kezes.
2014-11-05 23:15:11 +00:00
nicm
c3b2e5eed3 Wrap some long lines. 2014-04-17 12:57:28 +00:00
nicm
bce952777a Remove some unnecessary includes and fix a typo. 2014-04-17 11:38:35 +00:00
nicm
2740490e27 Remove the "info" message mechanism, this was only used for about five
mostly useless and annoying messages. Change those commands to silence
on success like all the others. Still accept the -q command line flag
and "quiet" server option for now.
2014-04-17 07:55:43 +00:00
nicm
992ef70fb6 Remove the monitor-content option and associated bits and bobs. It's
never worked very well. If there is a big demand for it to return, will
consider better ways to do it.
2014-04-17 07:36:45 +00:00
nicm
dca7d1c0fd Make message-limit a server option. 2014-03-31 21:41:35 +00:00
nicm
f1828921df Change terminal-overrides to a server option (now that we have them), it
doesn't make much sense as a session option.
2014-02-23 00:53:06 +00:00
nicm
62e0ed5d7e Fix missing argument, stupid last minute changes... 2014-01-28 23:11:44 +00:00
nicm
945339b443 Allow replacing each of the many sets of separate foo-{fg,bg,attr}
options with a single foo-style option. For example:

    set -g status-fg yellow
    set -g status-bg red
    set -g status-attr blink

Becomes:

    set -g status-style fg=yellow,bg=red,blink

The -a flag to set can be used to add to rather than replace a style. So:

    set -g status-bg red

Becomes:

    set -ag status-style bg=red

Currently this is fully backwards compatible (all *-{fg,bg,attr} options
remain) but the plan is to deprecate them over time.

From Tiago Cunha.
2014-01-28 23:07:09 +00:00
nicm
282c5f9644 Alter how tmux handles the working directory to internally use file
descriptors rather than strings.

- Each session still has a current working directory.

- New sessions still get their working directory from the client that
  created them or its attached session if any.

- New windows are created by default in the session working directory.

- The -c flag to new, neww, splitw allows the working directory to be
  overridden.

- The -c flag to attach let's the session working directory be changed.

- The default-path option has been removed.

To get the equivalent to default-path '.', do:

        bind c neww -c $PWD

To get the equivalent of default-path '~', do:

        bind c neww -c ~

This also changes the client identify protocol to be a set of messages rather
than one as well as some other changes that should make it easier to make
backwards-compatible protocol changes in future.
2013-10-10 12:26:34 +00:00
nicm
fd1750af49 Add automatic-rename-format option allowing automatic rename to use
something other than pane_current_command.
2013-10-10 11:56:50 +00:00
nicm
40811eb8d4 Add length limit operator for formats. 2013-10-10 11:50:20 +00:00
nicm
7c71c3e27d Change the default for the default-path option to ~. This is a quick
change to turn off the KERN_PROC_CWD code which is unpredictable. Later
it will go away and there may be other changes to how this works.
2013-10-05 13:56:48 +00:00
Nicholas Marriott
3977dba761 Focus events can cause trouble if left on and they can't be turned off
during idle periods (like the other states are) because we'd miss
events. So add a server option to control them. Defaults to off.
2013-06-23 13:10:46 +00:00
Nicholas Marriott
13441e8cb8 The actual terminfo entries we ended up with for cursor changes are Cs,
Ce, Ss and Se (not Cc, Ce, Cs, Csr). So use and document these instead
of the ones we were using earlier.
2013-06-02 07:52:15 +00:00
Nicholas Marriott
982354765b Remove tmux's (already minimal) 88 colour support. Such terminals are
few and unnecessary.
2013-03-27 11:17:12 +00:00
Nicholas Marriott
e44bd9f750 Revert the command-prefix change which breaks sequences of commands. 2013-03-25 15:59:57 +00:00
Nicholas Marriott
8094e82287 Add option command-prefix which is automatically prepended to any
command (apart from a naked default-shell). The default is "exec ".
2013-03-24 09:21:27 +00:00
Nicholas Marriott
69fe5ca567 Add -v to set and setw to show only option value. 2013-03-21 16:15:52 +00:00
Nicholas Marriott
e33ba57c13 Remove the layout undo/redo code which never really worked. 2013-01-17 00:11:22 +00:00
Nicholas Marriott
bc2e4a36df If timing between keys is less than (by default) 1 millisecond, assume
the text is being pasted. assume-paste-time option changes the value (0
disables). Based on a diff from Marcin Kulik.
2013-01-15 22:55:29 +00:00
Nicholas Marriott
93224260ae Add window-status-last-* options, from Boris Faure. 2012-11-27 13:52:23 +00:00
Nicholas Marriott
a6c22d650b Add a flag to move-window to renumber the windows in a session (closing
any gaps) and add an option to do this automatically each time a window
is killed. From Thomas Adam.
2012-04-29 17:20:01 +00:00
Nicholas Marriott
e02d1bce98 Add window-status-separator option, from Thomas Adam. 2012-04-23 22:23:14 +00:00
Nicholas Marriott
85f5485cb5 Add a layout history which can be stepped through with select-layout -u
and -U commands (bound to 'u' and 'U' by default).
2012-04-01 13:18:38 +00:00
Nicholas Marriott
01f2b5d64b 50 is a too low trigger default on larger terminals, bump to 250. 2012-03-20 11:23:12 +00:00
Nicholas Marriott
f59971276a Add a simple form of output rate limiting by counting the number of
certain C0 sequences (linefeeds, backspaces, carriage returns) and if it
exceeds a threshold (current default 50/millisecond), start to redraw
the pane every 100 milliseconds instead of making each change as it
comes. Two configuration options - c0-change-trigger and
c0-change-interval.

This makes tmux much more responsive under very fast output (for example
yes(1) or accidentally cat'ing a large file) but may not be perfect on
all terminals and connections - feedback very welcome, particularly
where this change has a negative rather than positive effect (making it
off by default is a possibility).

After much experimentation based originally on a request Robin Lee
Powell (which ended with a completely different solution), this idea
from discussion with Ailin Nemui.
2012-03-20 11:01:00 +00:00
Nicholas Marriott
95f48a219a Add a wrap-search option to turn off wrapping of searches in copy
mode. From Jacobo de Vera.
2012-03-17 21:40:53 +00:00
Nicholas Marriott
952ffdd288 Remove accidentally committed option. 2012-02-29 21:10:51 +00:00
Nicholas Marriott
4e7de210e4 Allow a single option to be specified to show-options to show just that
option.
2012-02-25 12:57:42 +00:00
Nicholas Marriott
fe055c89f5 Sort some entries, from Ben Boeckel. 2012-02-15 18:44:49 +00:00
Nicholas Marriott
230d0fbc9e Add an option to move the status line to the top of the screen,
requested by many.
2012-01-29 09:37:02 +00:00
Nicholas Marriott
535286c05a Drop the ability to have a list of keys in the prefix in favour of two
separate options, prefix and prefix2. This simplifies the code and gets
rid the data options type which was only used for this one option.

Also add a -2 flag to send-prefix to send the secondary prefix key,
fixing a cause of minor irritation.

People who want three prefix keys are out of luck :-).
2012-01-21 08:40:09 +00:00
Nicholas Marriott
8cf19ab770 Add some trivial additional status line attributes from jwcxz at users
dot sourceforge dot net.
2012-01-20 19:51:28 +00:00
Nicholas Marriott
dcad13155b Add an option to disable the window rename escape sequence, from Romain
Francoise.
2012-01-20 19:15:40 +00:00
Nicholas Marriott
fd25d35868 Move word-separators to be a session rather than window option, from Ben
Boeckel.
2011-11-15 23:24:04 +00:00
Nicholas Marriott
e5bf63cb59 Option to change status line (message) background when using vi keys and
in command mode. From Ben Boeckel.
2011-11-05 09:06:31 +00:00
Nicholas Marriott
b2ee98b8d7 Add screen*:XT to terminal-overrides for tmux-in-tmux, from Romain
Francoise.
2011-10-27 22:54:06 +00:00
Nicholas Marriott
f01b7191a3 Add pane-base-index option, from Ben Barbour. 2011-08-24 10:29:57 +00:00
Nicholas Marriott
cc5bcbfb59 Extend the mode-mouse option to add a third choice which means the mouse
does not enter copy mode. Patch from SF bug 3374493.

In future the mode-mouse option is likely to die and be broken into
several smaller options.
2011-07-30 18:01:26 +00:00
Nicholas Marriott
f12158bc25 Add an option to trigger the terminal bell when there is an alert, from
Marco Beck.
2011-07-03 19:07:54 +00:00
Nicholas Marriott
3ea5e06bfb Support DECSCUSR sequence to set the cursor style with two new
terminfo(5) extensions, Cs and Csr. Written by Ailin Nemui.
2011-05-20 19:17:39 +00:00
Nicholas Marriott
944b5e6fa0 Support xterm(1) cursor colour change sequences through terminfo(5) Cc
(set) and Cr (reset) extensions. Originally by Sean Estabrooks, tweaked
by me and Ailin Nemui.
2011-05-20 19:03:58 +00:00
Nicholas Marriott
96e7f33da3 Support setting the xterm clipboard when copying from copy mode using
the xterm escape sequence for the purpose (if xterm is configured to
allow it).

Written by and much discussed Ailin Nemui, guidance on
xterm/termcap/terminfo from Thomas Dickey.
2011-05-18 20:24:29 +00:00
Nicholas Marriott
f3741f0653 Add a new option, mouse-resize-pane. When on, panes may be resized by
dragging their borders. From hsim at gmx.li.
2011-05-08 20:34:12 +00:00
Nicholas Marriott
295ace6820 Use the tsl and fsl terminfo(5) capabilities to update terminal title
and automatically fill them in on terminals with the XT capability
(which means their title setting is xterm-compatible). From hsim at
gmx.li.
2011-05-08 19:53:06 +00:00