Annotation of src/usr.bin/tmux/tmux.1, Revision 1.56
1.56 ! jmc 1: .\" $OpenBSD: tmux.1,v 1.55 2009/08/03 14:34:47 jmc Exp $
1.1 nicm 2: .\"
3: .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
4: .\"
5: .\" Permission to use, copy, modify, and distribute this software for any
6: .\" purpose with or without fee is hereby granted, provided that the above
7: .\" copyright notice and this permission notice appear in all copies.
8: .\"
9: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13: .\" WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
14: .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
15: .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16: .\"
1.55 jmc 17: .Dd $Mdocdate: August 3 2009 $
1.1 nicm 18: .Dt TMUX 1
19: .Os
20: .Sh NAME
21: .Nm tmux
1.6 jmc 22: .Nd terminal multiplexer
1.1 nicm 23: .Sh SYNOPSIS
24: .Nm tmux
25: .Bk -words
26: .Op Fl 28dqUuv
27: .Op Fl f Ar file
28: .Op Fl L Ar socket-name
29: .Op Fl S Ar socket-path
30: .Op Ar command Op Ar flags
31: .Ek
32: .Sh DESCRIPTION
33: .Nm
1.6 jmc 34: is a terminal multiplexer: it enables a number of terminals to be accessed and
1.1 nicm 35: controlled from a single terminal.
36: .Pp
37: .Nm
38: runs as a server-client system.
1.33 nicm 39: A server holds a number of
1.1 nicm 40: .Em sessions ,
41: each of which may have a number of
42: .Em windows
43: linked to it.
1.33 nicm 44: A server is started automatically when the first session is created and exits
45: when all the sessions it contains are destroyed.
1.1 nicm 46: A window may be split on screen into one or more
47: .Em panes ,
48: each of which is a separate terminal.
49: Any number of
50: .Em clients
51: may connect to a session, or the server
52: may be controlled by issuing commands with
53: .Nm .
54: Communication takes place through a socket, by default placed in
55: .Pa /tmp .
56: .Pp
57: The options are as follows:
58: .Bl -tag -width "XXXXXXXXXXXX"
59: .It Fl 2
60: Force
61: .Nm
62: to assume the terminal supports 256 colours.
63: .It Fl 8
64: Like
65: .Fl 2 ,
1.6 jmc 66: but indicates that the terminal supports 88 colours.
1.1 nicm 67: .It Fl d
68: Force
69: .Nm
70: to assume the terminal supports default colours.
71: .It Fl f Ar file
72: Specify an alternative configuration file.
73: By default,
74: .Nm
1.26 nicm 75: loads the system configuration file from
76: .Pa /etc/tmux.conf ,
77: if present, then looks for a user configuration file at
1.1 nicm 78: .Pa ~/.tmux.conf .
79: The configuration file is a set of
80: .Nm
81: commands which are executed in sequence when the server is first started.
82: .It Fl L Ar socket-name
83: .Nm
84: stores the server socket in a directory under
85: .Pa /tmp ;
86: the default socket is named
87: .Em default .
88: This option allows a different socket name to be specified, allowing several
89: independent
90: .Nm
91: servers to be run.
92: Unlike
93: .Fl S
94: a full path is not necessary: the sockets are all created in the same
95: directory.
1.2 nicm 96: .Pp
97: If the socket is accidentally removed, the
1.6 jmc 98: .Dv SIGUSR1
1.2 nicm 99: signal may be sent to the
100: .Nm
101: server process to recreate it.
1.4 sobrado 102: .It Fl q
1.6 jmc 103: Prevent the server sending various informational messages, for example when
1.4 sobrado 104: window flags are altered.
1.1 nicm 105: .It Fl S Ar socket-path
106: Specify a full alternative path to the server socket.
107: If
108: .Fl S
109: is specified, the default socket directory is not used and any
110: .Fl L
111: flag is ignored.
112: .It Fl U
113: Unlock the server.
114: .It Fl u
115: .Nm
1.14 nicm 116: attempts to guess if the terminal is likely to support UTF-8 by checking the
117: first of the
118: .Ev LC_ALL ,
119: .Ev LC_CTYPE
120: and
1.2 nicm 121: .Ev LANG
1.14 nicm 122: environment variables to be set for the string "UTF-8".
1.5 nicm 123: This is not always correct: the
1.2 nicm 124: .Fl u
125: flag explicitly informs
126: .Nm
1.6 jmc 127: that UTF-8 is supported.
1.33 nicm 128: .Pp
129: If the server is started from a client passed
130: .Fl u
131: or where UTF-8 is detected, the
132: .Ic utf8
133: and
134: .Ic status-utf8
135: options are enabled in the global window and session options respectively.
1.1 nicm 136: .It Fl v
137: Request verbose logging.
138: This option may be specified multiple times for increasing verbosity.
139: Log messages will be saved into
140: .Pa tmux-client-PID.log
141: and
142: .Pa tmux-server-PID.log
143: files in the current directory, where
144: .Em PID
1.6 jmc 145: is the PID of the server or client process.
1.1 nicm 146: .It Ar command Op Ar flags
147: This specifies one of a set of commands used to control
148: .Nm ,
1.6 jmc 149: as described in the following sections.
150: If no command and flags are specified, the
1.1 nicm 151: .Ic new-session
152: command is assumed.
153: .El
154: .Sh QUICK START
1.6 jmc 155: To create a new
156: .Nm
157: session running
1.1 nicm 158: .Xr vi 1 :
159: .Pp
160: .Dl $ tmux new-session vi
161: .Pp
162: Most commands have a shorter form, known as an alias.
163: For new-session, this is
164: .Ic new :
165: .Pp
166: .Dl $ tmux new vi
167: .Pp
168: Alternatively, the shortest unambiguous form of a command is accepted.
169: If there are several options, they are listed:
170: .Bd -literal -offset indent
171: $ tmux n
172: ambiguous command: n, could be: new-session, new-window, next-window
173: .Ed
174: .Pp
175: Within an active session, a new window may be created by typing
1.7 jmc 176: .Ql C-b c
177: (Ctrl
1.1 nicm 178: followed by the
1.6 jmc 179: .Ql b
1.7 jmc 180: key
181: followed by the
182: .Ql c
1.6 jmc 183: key).
1.1 nicm 184: .Pp
185: Windows may be navigated with:
186: .Ql C-b 0
187: (to select window 0),
188: .Ql C-b 1
189: (to select window 1), and so on;
190: .Ql C-b n
191: to select the next window; and
192: .Ql C-b p
193: to select the previous window.
194: .Pp
195: A session may be detached using
196: .Ql C-b d
197: and reattached with:
198: .Pp
199: .Dl $ tmux attach-session
200: .Pp
201: Typing
202: .Ql C-b \&?
203: lists the current key bindings in the current window; up and down may be used
204: to navigate the list or
1.6 jmc 205: .Ql q
1.1 nicm 206: to exit from it.
1.13 nicm 207: .Pp
208: Commands to be run when the
209: .Nm
210: server is started may be placed in the
1.15 jmc 211: .Pa ~/.tmux.conf
1.13 nicm 212: configuration file.
213: Common examples include:
1.15 jmc 214: .Pp
215: Changing the default prefix key:
1.13 nicm 216: .Bd -literal -offset indent
217: set-option -g prefix C-a
218: unbind-key C-b
219: bind-key C-a send-prefix
220: .Ed
221: .Pp
222: Turning the status line off, or changing its colour:
223: .Bd -literal -offset indent
224: set-option -g status off
225: set-option -g status-bg blue
226: .Ed
227: .Pp
1.15 jmc 228: Setting other options, such as the default command,
229: or locking after 30 minutes of inactivity:
1.13 nicm 230: .Bd -literal -offset indent
231: set-option -g default-command "exec /bin/ksh"
232: set-option -g lock-after-time 1800
233: .Ed
1.15 jmc 234: .Pp
235: Creating new key bindings:
1.13 nicm 236: .Bd -literal -offset indent
237: bind-key b set-option status
238: bind-key / command-prompt "split-window 'exec man %%'"
239: .Ed
1.1 nicm 240: .Sh KEY BINDINGS
241: .Nm
242: may be controlled from an attached client by using a key combination of a
243: prefix key,
244: .Ql C-b
1.6 jmc 245: (Ctrl-b) by default, followed by a command key.
1.1 nicm 246: .Pp
247: Some of the default key bindings include:
248: .Pp
1.6 jmc 249: .Bl -tag -width Ds -offset 3n -compact
250: .It c
251: Create new window.
252: .It d
1.1 nicm 253: Detach current client.
1.6 jmc 254: .It l
255: Move to last (previously selected) window in the current session.
256: .It n
1.1 nicm 257: Change to next window in the current session.
1.6 jmc 258: .It p
1.1 nicm 259: Change to previous window in the current session.
1.6 jmc 260: .It t
1.1 nicm 261: Display a large clock.
1.6 jmc 262: .It \&?
1.1 nicm 263: List current key bindings.
264: .El
265: .Pp
266: A complete list may be obtained with the
267: .Ic list-keys
268: command (bound to
269: .Ql \&?
270: by default).
271: Key bindings may be changed with the
272: .Ic bind-key
273: and
274: .Ic unbind-key
275: commands.
276: .Sh HISTORY
277: .Nm
278: maintains a configurable history buffer for each window.
1.6 jmc 279: By default, up to 2000 lines are kept; this can be altered with the
1.1 nicm 280: .Ic history-limit
281: option (see the
282: .Ic set-option
283: command below).
284: .Sh MODES
285: A
286: .Nm
287: window may be in one of several modes.
288: The default permits direct access to the terminal attached to the window.
289: The others are:
290: .Bl -tag -width Ds
291: .It Em output mode
292: This is entered when a command which produces output, such as
293: .Ic list-keys ,
294: is executed from a key binding.
295: .It Em scroll mode
296: This is entered with the
297: .Ic scroll-mode
298: command (bound to
299: .Ql =
300: by default) and permits the window history buffer to be inspected.
301: .It Em copy mode
302: This permits a section of a window or its history to be copied to a
303: .Em paste buffer
304: for later insertion into another window.
305: This mode is entered with the
306: .Ic copy-mode
307: command, bound to
308: .Ql [
309: by default.
310: .El
311: .Pp
1.6 jmc 312: The keys available depend on whether emacs or vi mode is selected
313: (see the
1.1 nicm 314: .Ic mode-keys
315: option).
316: The following keys are supported as appropriate for the mode:
317: .Bl -column "FunctionXXXXXXXXXXXX" "viXXXXXX" "emacs" -offset indent
318: .It Sy "Function" Ta Sy "vi" Ta Sy "emacs"
1.27 nicm 319: .It Li "Start of line" Ta "0" Ta "C-a"
320: .It Li "Back to indentation" Ta "^" Ta "M-m"
1.1 nicm 321: .It Li "Clear selection" Ta "Escape" Ta "C-g"
322: .It Li "Copy selection" Ta "Enter" Ta "M-w"
323: .It Li "Cursor down" Ta "j" Ta "Down"
324: .It Li "End of line" Ta "$" Ta "C-e"
325: .It Li "Cursor left" Ta "h" Ta "Left"
326: .It Li "Next page" Ta "C-f" Ta "Page down"
327: .It Li "Next word" Ta "w" Ta "M-f"
328: .It Li "Previous page" Ta "C-u" Ta "Page up"
329: .It Li "Previous word" Ta "b" Ta "M-b"
330: .It Li "Quit mode" Ta "q" Ta "Escape"
331: .It Li "Cursor right" Ta "l" Ta "Right"
332: .It Li "Start selection" Ta "Space" Ta "C-Space"
333: .It Li "Cursor up" Ta "k" Ta "Up"
1.48 nicm 334: .It Li "Delete to end of line" Ta "D" Ta "C-k"
1.2 nicm 335: .It Li "Paste buffer" Ta "p" Ta "C-y"
1.1 nicm 336: .El
337: .Pp
1.48 nicm 338: These key bindings are defined in a set of named tables:
339: .Em vi-edit
340: and
341: .Em emacs-edit
342: for keys used when line editing at the command prompt;
343: .Em vi-choice
344: and
345: .Em emacs-choice
346: for keys used when choosing from lists (such as produced by the
347: .Ic window-choose
348: command) or in output mode; and
349: .Em vi-copy
350: and
351: .Em emacs-copy
352: used in copy and scroll modes.
353: The tables may be viewed with the
354: .Ic list-keys
1.49 nicm 355: command and keys modified or removed with
356: .Ic bind-key
357: and
358: .Ic unbind-key .
1.48 nicm 359: .Pp
1.2 nicm 360: The paste buffer key pastes the first line from the top paste buffer on the
361: stack.
1.1 nicm 362: .Sh BUFFERS
363: .Nm
364: maintains a stack of
365: .Em paste buffers
366: for each session.
367: Up to the value of the
368: .Ic buffer-limit
369: option are kept; when a new buffer is added, the buffer at the bottom of the
370: stack is removed.
371: Buffers may be added using
372: .Ic copy-mode
373: or the
374: .Ic set-buffer
375: command, and pasted into a window using the
376: .Ic paste-buffer
377: command.
1.18 nicm 378: .Sh OPTIONS
379: The appearance and behaviour of
380: .Nm
381: may be modified by changing the value of various options.
382: There are two types of option:
383: .Em session options
384: and
385: .Em window options .
386: .Pp
387: Each individual session may have a set of session options, and there is a
388: separate set of global session options.
389: Sessions which do not have a particular option configured inherit the value
390: from the global session options.
391: Session options are set or unset with the
392: .Ic set-option
393: command and may be listed with the
394: .Ic show-options
395: command.
396: The available session options are listed under the
397: .Ic set-option
398: command.
399: .Pp
400: Similarly, a set of window options is attached to each window, and there is
401: a set of global window options from which any unset options are inherited.
402: Window options are altered with the
403: .Ic set-window-option
404: command and can be listed with the
405: .Ic show-window-options
406: command.
407: All window options are documented with the
408: .Ic set-window-option
409: command.
1.1 nicm 410: .Sh PANES AND LAYOUTS
411: Each window displayed by
412: .Nm
413: may be split into one or more
414: .Em panes ;
415: each pane takes up a certain area of the display and is a separate terminal.
416: A window may be split into panes using the
417: .Ic split-window
418: command.
1.38 nicm 419: Windows may be split horizontally (with the
420: .Fl h
421: flag) or vertically.
422: Panes may be resized with the
423: .Ic resize-pane
1.1 nicm 424: command (bound to
1.38 nicm 425: .Ql C-up ,
426: .Ql C-down
427: .Ql C-left
428: and
429: .Ql C-right
1.1 nicm 430: by default), the current pane may be changed with the
431: .Ic up-pane
432: and
433: .Ic down-pane
434: commands and the
435: .Ic rotate-window
436: and
437: .Ic swap-pane
1.38 nicm 438: commands may be used to swap panes without changing their position.
439: Panes are numbered beginning from zero in the order they are created.
440: .Pp
441: A number of preset
442: .Em layouts
443: are available.
444: These may be selected with the
445: .Ic select-layout
446: command or cycled with
447: .Ic next-layout
448: (bound to
449: .Ql C-space
450: by default); once a layout is chosen, panes within it may be moved and resized as normal.
1.1 nicm 451: .Pp
452: The following layouts are supported:
453: .Bl -tag -width Ds
454: .It Ic even-horizontal
455: Panes are spread out evenly from left to right across the window.
456: .It Ic even-vertical
457: Panes are spread evenly from top to bottom.
1.2 nicm 458: .It Ic main-horizontal
459: A large (main) pane is shown at the top of the window and the remaining panes are
1.6 jmc 460: spread from left to right in the leftover space at the bottom.
1.2 nicm 461: Use the
462: .Em main-pane-height
463: window option to specify the height of the top pane.
1.1 nicm 464: .It Ic main-vertical
1.2 nicm 465: Similar to
466: .Ic main-horizontal
467: but the large pane is placed on the left and the others spread from top to
468: bottom along the right.
469: See the
470: .Em main-pane-width
471: window option.
1.1 nicm 472: .El
1.8 nicm 473: .Sh STATUS LINE
474: .Nm
475: includes an optional status line which is displayed in the bottom line of each
476: terminal.
477: By default, the status line is enabled (it may be disabled with the
478: .Ic status
479: session option) and contains, from left-to-right: the name of the current
480: session in square brackets; the window list; the current window title in double
481: quotes; and the time and date.
482: .Pp
483: The status line is made of three parts: configurable left and right sections
484: (which may contain dynamic content such as the time or output from a shell
485: command, see the
486: .Ic status-left ,
487: .Ic status-left-length ,
488: .Ic status-right ,
489: and
490: .Ic status-right-length
491: options below), and a central window list.
492: The window list shows the index, name and (if any) flag of the windows
493: present in the current session in ascending numerical order.
494: The flag is one of the following symbols appended to the window name:
495: .Bl -column "Symbol" "Meaning" -offset indent
496: .It Sy "Symbol" Ta Sy "Meaning"
497: .It Li "*" Ta "Denotes the current window."
498: .It Li "-" Ta "Marks the last window (previously selected)."
499: .It Li "#" Ta "Window is monitored and activity has been detected."
500: .It Li "!" Ta "A bell has occurred in the window."
501: .It Li "+" Ta "Window is monitored for content and it has appeared."
502: .El
503: .Pp
504: The # symbol relates to the
505: .Ic monitor-activity
506: and + to the
507: .Ic monitor-content
508: window options.
509: The window name is printed in inverted colours if an alert (bell, activity or
510: content) is present.
511: .Pp
512: The colour and attributes of the status line may be configured, the entire status line using
513: the
514: .Ic status-attr ,
515: .Ic status-fg
516: and
517: .Ic status-bg
518: session options and individual windows using the
519: .Ic window-status-attr ,
520: .Ic window-status-fg
521: and
522: .Ic window-status-bg
523: window options.
524: .Pp
525: The status line is automatically refreshed at interval if it has changed, the interval may be
526: controlled with the
527: .Ic status-interval
528: session option.
1.1 nicm 529: .Sh COMMANDS
530: This section contains a list of the commands supported by
531: .Nm .
532: Most commands accept the optional
533: .Fl t
534: argument with one of
535: .Ar target-client ,
536: .Ar target-session
1.52 nicm 537: .Ar target-window ,
1.1 nicm 538: or
1.52 nicm 539: .Ar target-pane .
540: These specify the client, session, window or pane which a command should affect.
1.1 nicm 541: .Ar target-client
542: is the name of the
543: .Xr pty 4
1.29 nicm 544: file to which the client is connected, for example either of
545: .Pa /dev/ttyp1
546: or
547: .Pa ttyp1
1.30 jmc 548: for the client attached to
1.1 nicm 549: .Pa /dev/ttyp1 .
1.29 nicm 550: If no client is specified, the current client is chosen, if possible, or an
551: error is reported.
1.1 nicm 552: Clients may be listed with the
553: .Ic list-clients
554: command.
555: .Pp
556: .Ar target-session
557: is either the name of a session (as listed by the
558: .Ic list-sessions
1.29 nicm 559: command) or the name of a client with the same syntax as
1.1 nicm 560: .Ar target-client ,
1.6 jmc 561: in which case the session attached to the client is used.
1.30 jmc 562: When looking for the session name,
1.29 nicm 563: .Nm
564: initially searches for an exact match; if none is found, the session names
565: are checked for any for which
566: .Ar target-session
567: is a prefix or for which it matches as an
1.1 nicm 568: .Xr fnmatch 3
1.29 nicm 569: pattern.
570: If a single match is found, it is used as the target session; multiple matches
1.43 nicm 571: produce an error.
1.29 nicm 572: If a session is omitted, the current session is used if available; if no
573: current session is available, the most recently created is chosen.
1.1 nicm 574: .Pp
575: .Ar target-window
576: specifies a window in the form
1.43 nicm 577: .Em session Ns \&: Ns Em window .
578: .Em session
579: follows the same rules as for
580: .Ar target-session ,
581: and
1.29 nicm 582: .Em window
1.43 nicm 583: is looked for in order: as a window index, for example mysession:1; as an exact
584: window name, such as mysession:mywindow; then as an
1.29 nicm 585: .Xr fnmatch 3
1.43 nicm 586: pattern or the start of a window name, such as mysession:mywin* or
587: mysession:mywin.
588: An empty window name specifies the next unused index if appropriate (for
589: example the
590: .Ic new-window
591: and
592: .Ic link-window
593: commands)
594: otherwise the current window in
1.1 nicm 595: .Em session
1.43 nicm 596: is chosen.
1.6 jmc 597: When the argument does not contain a colon,
1.1 nicm 598: .Nm
1.43 nicm 599: first attempts to parse it as window; if that fails, an attempt is made to
600: match a session.
1.1 nicm 601: .Pp
1.52 nicm 602: .Ar target-pane
603: takes a similar form to
604: .Ar target-window
605: but with the optional addition of a period followed by a pane index, for
606: example: mysession:mywindow.1.
607: If the pane index is omitted, the currently active pane in the specified
608: window is used.
609: If neither a colon nor period appears,
610: .Nm
611: first attempts to use the argument as a pane index; if that fails, it is looked
612: up as for
613: .Ar target-window .
614: .Pp
1.1 nicm 615: Multiple commands may be specified together as part of a
616: .Em command sequence .
1.6 jmc 617: Each command should be separated by spaces and a semicolon;
1.1 nicm 618: commands are executed sequentially from left to right.
619: A literal semicolon may be included by escaping it with a backslash (for
620: example, when specifying a command sequence to
621: .Ic bind-key ) .
622: .Pp
623: Examples include:
624: .Bd -literal -offset indent
625: refresh-client -t/dev/ttyp2
626:
627: rename-session -tfirst newname
628:
629: set-window-option -t:0 monitor-activity on
630:
631: new-window ; split-window -d
632:
633: bind-key D detach-client \e\; lock-server
634: .Ed
635: .Pp
636: The following commands are available:
637: .Bl -tag -width Ds
638: .It Xo Ic attach-session
639: .Op Fl d
640: .Op Fl t Ar target-session
641: .Xc
642: .D1 (alias: Ic attach )
1.34 nicm 643: If run from outside
644: .Nm ,
645: create a new client in the current terminal and attach it to
646: .Ar target-session .
647: If used from inside, switch the current client.
1.1 nicm 648: If
649: .Fl d
650: is specified, any other clients attached to the session are detached.
651: .Pp
652: If no server is started,
653: .Ic attach-session
654: will attempt to start it; this will fail unless sessions are created in the
655: configuration file.
656: .It Xo Ic bind-key
1.49 nicm 657: .Op Fl cnr
658: .Op Fl t Ar key-table
1.1 nicm 659: .Ar key Ar command Op Ar arguments
660: .Xc
661: .D1 (alias: Ic bind )
662: Bind key
663: .Ar key
664: to
665: .Ar command .
666: Keys may be specified prefixed with
667: .Ql C-
668: or
669: .Ql ^
1.6 jmc 670: for Ctrl keys, or
1.1 nicm 671: .Ql M-
1.6 jmc 672: for Alt (meta) keys.
1.49 nicm 673: .Pp
674: By default (without
675: .Fl t )
676: the primary key bindings are modified (those normally activated with the prefix
677: key); in this case, if
1.45 nicm 678: .Fl n
679: is specified, it is not necessary to use the prefix key,
680: .Ar command
681: is bound to
682: .Ar key
683: alone.
1.1 nicm 684: The
685: .Fl r
686: flag indicates this key may repeat, see the
687: .Ic repeat-time
688: option.
1.49 nicm 689: .Pp
690: If
691: .Fl t
692: is present,
693: .Ar key
694: is bound in
695: .Ar key-table :
696: the binding for command mode with
697: .Fl c
698: or for normal mode without.
699: To view the default bindings and possible commands, see the
700: .Ic list-keys
701: command.
1.1 nicm 702: .It Xo Ic break-pane
703: .Op Fl d
1.52 nicm 704: .Op Fl t Ar target-pane
1.1 nicm 705: .Xc
1.17 nicm 706: .D1 (alias: Ic breakp )
1.52 nicm 707: Break
708: .Ar target-pane
709: off from its containing window to make it the only pane in a new window.
1.1 nicm 710: If
711: .Fl d
712: is given, the new window does not become the current window.
1.56 ! jmc 713: .It Ic choose-session Op Fl t Ar target-window
1.1 nicm 714: Put a window into session choice mode, where the session for the current
715: client may be selected interactively from a list.
716: This command works only from inside
717: .Nm .
1.56 ! jmc 718: .It Ic choose-window Op Fl t Ar target-window
1.1 nicm 719: Put a window into window choice mode, where the window for the session
720: attached to the current client may be selected interactively from a list.
721: This command works only from inside
722: .Nm .
1.56 ! jmc 723: .It Ic clear-history Op Fl t Ar target-pane
1.17 nicm 724: .D1 (alias: Ic clearhist )
1.2 nicm 725: Remove and free the history for the specified pane.
1.56 ! jmc 726: .It Ic clock-mode Op Fl t Ar target-window
1.1 nicm 727: Display a large clock.
728: .It Xo Ic command-prompt
729: .Op Fl t Ar target-client
730: .Op Ar template
731: .Xc
732: Open the command prompt in a client.
733: This may be used from inside
734: .Nm
735: to execute commands interactively.
736: If
737: .Ar template
738: is specified, it is used as the command; any %% in the template will be
739: replaced by what is entered at the prompt.
740: .It Xo Ic confirm-before
741: .Op Fl t Ar target-client
742: .Ar command
743: .Xc
1.17 nicm 744: .D1 (alias: Ic confirm )
1.1 nicm 745: Ask for confirmation before executing
746: .Ar command .
747: This command works only from inside
748: .Nm .
749: .It Xo Ic copy-buffer
750: .Op Fl a Ar src-index
751: .Op Fl b Ar dst-index
752: .Op Fl s Ar src-session
753: .Op Fl t Ar dst-session
754: .Xc
1.17 nicm 755: .D1 (alias: Ic copyb )
1.1 nicm 756: Copy a session paste buffer to another session.
757: If no sessions are specified, the current one is used instead.
758: .It Xo Ic copy-mode
759: .Op Fl u
760: .Op Fl t Ar target-window
761: .Xc
762: Enter copy mode.
763: The
764: .Fl u
765: option scrolls one page up.
766: .It Xo Ic delete-buffer
767: .Op Fl b Ar buffer-index
768: .Op Fl t Ar target-session
769: .Xc
770: .D1 (alias: Ic deleteb )
771: Delete the buffer at
772: .Ar buffer-index ,
773: or the top buffer if not specified.
1.56 ! jmc 774: .It Ic detach-client Op Fl t Ar target-client
1.1 nicm 775: .D1 (alias: Ic detach )
776: Detach the current client if bound to a key, or the specified client with
777: .Fl t .
1.35 nicm 778: .It Xo Ic display-message
779: .Op Fl t Ar target-client
780: .Op Ar message
781: .Xc
782: .D1 (alias: Ic display )
783: Display a message (see the
784: .Ic status-left
785: option below)
786: in the status line.
1.56 ! jmc 787: .It Ic down-pane Op Fl t Ar target-pane
1.1 nicm 788: .D1 (alias: Ic downp )
789: Move down a pane.
790: .It Xo Ic find-window
791: .Op Fl t Ar target-window
792: .Ar match-string
793: .Xc
794: .D1 (alias: Ic findw )
1.16 nicm 795: Search for the
796: .Xr fnmatch 3
797: pattern
1.1 nicm 798: .Ar match-string
799: in window names, titles, and visible content (but not history).
800: If only one window is matched, it'll be automatically selected, otherwise a
801: choice list is shown.
802: This command only works from inside
803: .Nm .
1.56 ! jmc 804: .It Ic has-session Op Fl t Ar target-session
1.1 nicm 805: .D1 (alias: Ic has )
806: Report an error and exit with 1 if the specified session does not exist.
807: If it does exist, exit with 0.
1.56 ! jmc 808: .It Ic if-shell Ar shell-command command
1.20 nicm 809: .D1 (alias: Ic if )
810: Execute
811: .Ar command
812: if
813: .Ar shell-command
814: returns success.
1.56 ! jmc 815: .It Ic kill-pane Op Fl t Ar target-pane
1.1 nicm 816: .D1 (alias: Ic killp )
817: Destroy the given pane.
1.36 nicm 818: If no panes remain in the containing window, it is also destroyed.
1.56 ! jmc 819: .It Ic kill-server
1.1 nicm 820: Kill the
821: .Nm
822: server and clients and destroy all sessions.
1.56 ! jmc 823: .It Ic kill-session Op Fl t Ar target-session
1.1 nicm 824: Destroy the given session, closing any windows linked to it and no other
825: sessions, and detaching all clients attached to it.
1.56 ! jmc 826: .It Ic kill-window Op Fl t Ar target-window
1.1 nicm 827: .D1 (alias: Ic killw )
828: Kill the current window or the window at
829: .Ar target-window ,
830: removing it from any sessions to which it is linked.
1.56 ! jmc 831: .It Ic last-window Op Fl t Ar target-session
1.1 nicm 832: .D1 (alias: Ic last )
833: Select the last (previously selected) window.
834: If no
835: .Ar target-session
836: is specified, select the last window of the current session.
837: .It Xo Ic link-window
838: .Op Fl dk
839: .Op Fl s Ar src-window
840: .Op Fl t Ar dst-window
841: .Xc
842: .D1 (alias: Ic linkw )
843: Link the window at
844: .Ar src-window
845: to the specified
846: .Ar dst-window .
847: If
848: .Ar dst-window
849: is specified and no such window exists, the
850: .Ar src-window
851: is linked there.
852: If
853: .Fl k
854: is given and
855: .Ar dst-window
856: exists, it is killed, otherwise an error is generated.
857: If
858: .Fl d
859: is given, the newly linked window is not selected.
1.56 ! jmc 860: .It Ic list-buffers Op Fl t Ar target-session
1.1 nicm 861: .D1 (alias: Ic lsb )
862: List the buffers in the given session.
1.56 ! jmc 863: .It Ic list-clients
1.1 nicm 864: .D1 (alias: Ic lsc )
865: List all clients attached to the server.
1.56 ! jmc 866: .It Ic list-commands
1.1 nicm 867: .D1 (alias: Ic lscm )
868: List the syntax of all commands supported by
869: .Nm .
1.56 ! jmc 870: .It Ic list-keys Op Fl t Ar key-table
1.1 nicm 871: .D1 (alias: Ic lsk )
872: List all key bindings.
1.48 nicm 873: Without
874: .Fl t
875: the primary key bindings - those executed when preceded by the prefix key -
876: are printed.
1.45 nicm 877: Keys bound without the prefix key (see
878: .Ic bind-key
879: .Fl n )
880: are enclosed in square brackets.
1.48 nicm 881: .Pp
882: With
883: .Fl t ,
884: the key bindings in
885: .Ar key-table
886: are listed; this may be one of:
887: .Em vi-edit ,
888: .Em emacs-edit ,
889: .Em vi-choice ,
890: .Em emacs-choice ,
891: .Em vi-copy
892: or
893: .Em emacs-copy .
1.56 ! jmc 894: .It Ic list-sessions
1.1 nicm 895: .D1 (alias: Ic ls )
896: List all sessions managed by the server.
1.56 ! jmc 897: .It Ic list-windows Op Fl t Ar target-session
1.1 nicm 898: .D1 (alias: Ic lsw )
899: List windows in the current session or in
900: .Ar target-session .
901: .It Xo Ic load-buffer
902: .Op Fl b Ar buffer-index
903: .Op Fl t Ar target-session
904: .Ar path
905: .Xc
906: .D1 (alias: Ic loadb )
907: Load the contents of the specified paste buffer from
908: .Ar path .
1.56 ! jmc 909: .It Ic lock-server
1.1 nicm 910: .D1 (alias: Ic lock )
911: Lock the server until a password is entered.
912: .It Xo Ic move-window
913: .Op Fl d
914: .Op Fl s Ar src-window
915: .Op Fl t Ar dst-window
916: .Xc
917: .D1 (alias: Ic movew )
918: This is similar to
919: .Ic link-window ,
920: except the window at
921: .Ar src-window
922: is moved to
923: .Ar dst-window .
924: .It Xo Ic new-session
925: .Op Fl d
926: .Op Fl n Ar window-name
927: .Op Fl s Ar session-name
928: .Op Ar command
929: .Xc
930: .D1 (alias: Ic new )
931: Create a new session with name
932: .Ar session-name .
933: The new session is attached to the current terminal unless
934: .Fl d
935: is given.
936: .Ar window-name
937: and
938: .Ar command
939: are the name of and command to execute in the initial window.
940: .It Xo Ic new-window
1.28 nicm 941: .Op Fl dk
1.1 nicm 942: .Op Fl n Ar window-name
943: .Op Fl t Ar target-window
944: .Op Ar command
945: .Xc
946: .D1 (alias: Ic neww )
947: Create a new window.
948: If
949: .Fl d
950: is given, the session does not make the new window the current window.
951: .Ar target-window
1.28 nicm 952: represents the window to be created; if the target already exists an error is
953: shown, unless the
954: .Fl k
955: flag is used, in which case it is destroyed.
1.1 nicm 956: .Ar command
957: is the command to execute.
958: If
959: .Ar command
960: is not specified, the default command is used.
961: .Pp
962: The
963: .Ev TERM
964: environment variable must be set to
965: .Dq screen
966: for all programs running
967: .Em inside
968: .Nm .
969: New windows will automatically have
970: .Dq TERM=screen
971: added to their environment, but care must be taken not to reset this in shell
972: start-up files.
1.56 ! jmc 973: .It Ic next-layout Op Fl t Ar target-window
1.1 nicm 974: .D1 (alias: Ic nextl )
975: Move a window to the next layout and rearrange the panes to fit.
976: .It Xo Ic next-window
1.9 nicm 977: .Op Fl a
1.1 nicm 978: .Op Fl t Ar target-session
979: .Xc
980: .D1 (alias: Ic next )
981: Move to the next window in the session.
1.9 nicm 982: If
1.12 jmc 983: .Fl a
1.9 nicm 984: is used, move to the next window with a bell, activity or content alert.
1.1 nicm 985: .It Xo Ic paste-buffer
1.25 nicm 986: .Op Fl dr
1.1 nicm 987: .Op Fl b Ar buffer-index
988: .Op Fl t Ar target-window
989: .Xc
990: .D1 (alias: Ic pasteb )
991: Insert the contents of a paste buffer into the current window.
1.23 nicm 992: With
993: .Fl d ,
994: also delete the paste buffer from the stack.
1.24 nicm 995: When output, any linefeed (LF) characters in the paste buffer are replaced with
996: carriage returns (CR).
997: This translation may be disabled with the
998: .Fl r
999: flag.
1.1 nicm 1000: .It Xo Ic previous-window
1.9 nicm 1001: .Op Fl a
1.1 nicm 1002: .Op Fl t Ar target-session
1003: .Xc
1004: .D1 (alias: Ic prev )
1005: Move to the previous window in the session.
1.9 nicm 1006: With
1007: .Fl a ,
1008: move to the previous window with a bell, activity or content alert.
1.56 ! jmc 1009: .It Ic refresh-client Op Fl t Ar target-client
1.1 nicm 1010: .D1 (alias: Ic refresh )
1011: Refresh the current client if bound to a key, or a single client if one is given
1012: with
1013: .Fl t .
1014: .It Xo Ic rename-session
1015: .Op Fl t Ar target-session
1016: .Ar new-name
1017: .Xc
1018: .D1 (alias: Ic rename )
1019: Rename the session to
1020: .Ar new-name .
1021: .It Xo Ic rename-window
1022: .Op Fl t Ar target-window
1023: .Ar new-name
1024: .Xc
1025: .D1 (alias: Ic renamew )
1026: Rename the current window, or the window at
1027: .Ar target-window
1028: if specified, to
1029: .Ar new-name .
1030: .It Xo Ic resize-pane
1.39 jmc 1031: .Op Fl DLRU
1.52 nicm 1032: .Op Fl t Ar target-pane
1.1 nicm 1033: .Op Ar adjustment
1034: .Xc
1035: .D1 (alias: Ic resizep )
1036: Resize a pane, upward with
1037: .Fl U
1.38 nicm 1038: (the default), downward with
1039: .Fl D ,
1040: to the left with
1041: .Fl L
1042: and to the right with
1.39 jmc 1043: .Fl R .
1.1 nicm 1044: The
1045: .Ar adjustment
1.38 nicm 1046: is given in lines or cells (the default is 1).
1.1 nicm 1047: .It Xo Ic respawn-window
1048: .Op Fl k
1049: .Op Fl t Ar target-window
1050: .Op Ar command
1051: .Xc
1052: .D1 (alias: Ic respawnw )
1053: Reactive a window in which the command has exited (see the
1054: .Ic remain-on-exit
1055: window option).
1056: If
1057: .Ar command
1058: is not given, the command used when the window was created is executed.
1059: The window must be already inactive, unless
1060: .Fl k
1061: is given, in which case any existing command is killed.
1062: .It Xo Ic rotate-window
1063: .Op Fl DU
1064: .Op Fl t Ar target-window
1065: .Xc
1066: .D1 (alias: Ic rotatew )
1067: Rotate the positions of the panes within a window, either upward (numerically
1068: lower) with
1069: .Fl U
1070: or downward (numerically higher).
1071: .It Xo Ic save-buffer
1072: .Op Fl a
1073: .Op Fl b Ar buffer-index
1074: .Op Fl t Ar target-session
1075: .Ar path
1076: .Xc
1077: .D1 (alias: Ic saveb )
1078: Save the contents of the specified paste buffer to
1079: .Ar path .
1080: The
1081: .Fl a
1082: option appends to rather than overwriting the file.
1083: .It Xo Ic scroll-mode
1084: .Op Fl u
1085: .Op Fl t Ar target-window
1086: .Xc
1087: Enter scroll mode.
1088: The
1089: .Fl u
1090: has the same meaning as in the
1091: .Ic copy-mode
1092: command.
1.2 nicm 1093: .It Xo Ic select-layout
1094: .Op Fl t Ar target-window
1.47 nicm 1095: .Op Ar layout-name
1.2 nicm 1096: .Xc
1.17 nicm 1097: .D1 (alias: selectl )
1.2 nicm 1098: Choose a specific layout for a window.
1.47 nicm 1099: If
1100: .Ar layout-name
1101: is not given, the last layout used (if any) is reapplied.
1.56 ! jmc 1102: .It Ic select-pane Op Fl t Ar target-pane
1.1 nicm 1103: .D1 (alias: Ic selectp )
1104: Make pane
1.52 nicm 1105: .Ar target-pane
1.1 nicm 1106: the active pane in window
1107: .Ar target-window .
1.56 ! jmc 1108: .It Ic select-prompt Op Fl t Ar target-client
1.1 nicm 1109: Open a prompt inside
1110: .Ar target-client
1111: allowing a window index to be entered interactively.
1.56 ! jmc 1112: .It Ic select-window Op Fl t Ar target-window
1.1 nicm 1113: .D1 (alias: Ic selectw )
1114: Select the window at
1115: .Ar target-window .
1116: .It Xo Ic send-keys
1117: .Op Fl t Ar target-window
1118: .Ar key Ar ...
1119: .Xc
1120: .D1 (alias: Ic send )
1121: Send a key or keys to a window.
1122: Each argument
1123: .Ar key
1124: is the name of the key (such as
1125: .Ql C-a
1126: or
1127: .Ql npage
1128: ) to send; if the string is not recognised as a key, it is sent as a series of
1129: characters.
1130: All arguments are sent sequentially from first to last.
1.56 ! jmc 1131: .It Ic send-prefix Op Fl t Ar target-window
1.1 nicm 1132: Send the prefix key to a window as if it was pressed.
1.56 ! jmc 1133: .It Ic server-info
1.1 nicm 1134: .D1 (alias: Ic info )
1135: Show server information and terminal details.
1136: .It Xo Ic set-buffer
1137: .Op Fl b Ar buffer-index
1138: .Op Fl t Ar target-session
1139: .Ar data
1140: .Xc
1141: .D1 (alias: Ic setb )
1142: Set the contents of the specified buffer to
1143: .Ar data .
1144: .It Xo Ic set-option
1145: .Op Fl gu
1146: .Op Fl t Ar target-session
1147: .Ar option Ar value
1148: .Xc
1149: .D1 (alias: Ic set )
1.18 nicm 1150: Set a session option.
1.1 nicm 1151: If
1152: .Fl g
1.18 nicm 1153: is specified, the global session option is set.
1.1 nicm 1154: The
1155: .Fl u
1156: flag unsets an option, so a session inherits the option from the global
1157: options - it is not possible to unset a global option.
1158: .Pp
1.18 nicm 1159: Available session options are:
1.1 nicm 1160: .Bl -tag -width Ds
1161: .It Xo Ic bell-action
1.56 ! jmc 1162: .Op Ic any | none | current
1.1 nicm 1163: .Xc
1164: Set action on window bell.
1165: .Ic any
1166: means a bell in any window linked to a session causes a bell in the current
1167: window of that session,
1168: .Ic none
1169: means all bells are ignored and
1170: .Ic current
1171: means only bell in windows other than the current window are ignored.
1172: .It Ic buffer-limit Ar number
1173: Set the number of buffers kept for each session; as new buffers are added to
1174: the top of the stack, old ones are removed from the bottom if necessary to
1175: maintain this maximum length.
1176: .It Ic default-command Ar command
1177: Set the command used for new windows (if not specified when the window is
1178: created) to
1179: .Ar command .
1.19 nicm 1180: The default is an empty string, which instructs
1181: .Nm
1182: to create a login shell using the
1183: .Ev SHELL
1184: environment variable or, if it is unset, the user's shell returned by
1185: .Xr getpwuid 3 .
1.1 nicm 1186: .It Ic default-path Ar path
1187: Set the default working directory for processes created from keys, or
1188: interactively from the prompt.
1189: The default is the current working directory when the server is started.
1.22 nicm 1190: .It Ic default-terminal Ar terminal
1191: Set the default terminal for new windows created in this session - the
1192: default value of the
1193: .Ev TERM
1194: environment variable.
1195: For
1196: .Nm
1197: to work correctly, this
1198: .Em must
1199: be set to
1200: .Ql screen
1201: or a derivative of it.
1.21 nicm 1202: .It Ic display-time Ar time
1203: Set the amount of time for which status line messages are displayed.
1204: .Ar time
1205: is in milliseconds.
1.1 nicm 1206: .It Ic history-limit Ar lines
1207: Set the maximum number of lines held in window history.
1208: This setting applies only to new windows - existing window histories are not
1209: resized and retain the limit at the point they were created.
1210: .It Ic lock-after-time Ar number
1211: Lock the server after
1212: .Ar number
1213: seconds of inactivity.
1214: The default is off (set to 0).
1215: This has no effect as a session option; it must be set as a global option using
1216: .Fl g .
1217: .It Ic message-attr Ar attributes
1218: Set status line message attributes, where
1219: .Ar attributes
1220: is either
1221: .Ic default
1222: or a comma-delimited list of one or more of:
1223: .Ic bright
1224: (or
1225: .Ic bold ) ,
1226: .Ic dim ,
1227: .Ic underscore ,
1228: .Ic blink ,
1229: .Ic reverse ,
1230: .Ic hidden ,
1231: or
1232: .Ic italics .
1233: .It Ic message-bg Ar colour
1234: Set status line message background colour, where
1235: .Ar colour
1236: is one of:
1237: .Ic black ,
1238: .Ic red ,
1239: .Ic green ,
1240: .Ic yellow ,
1241: .Ic blue ,
1242: .Ic magenta ,
1243: .Ic cyan ,
1244: .Ic white
1245: or
1246: .Ic default .
1247: .It Ic message-fg Ar colour
1248: Set status line message foreground colour.
1249: .It Ic prefix Ar key
1250: Set the current prefix key.
1.21 nicm 1251: .It Ic repeat-time Ar time
1.1 nicm 1252: Allow multiple commands to be entered without pressing the prefix-key again
1253: in the specified
1.21 nicm 1254: .Ar time
1.1 nicm 1255: milliseconds (the default is 500).
1256: Whether a key repeats may be set when it is bound using the
1257: .Fl r
1258: flag to
1259: .Ic bind-key .
1.52 nicm 1260: Repeat is enabled for the default keys bound to the
1261: .Ic resize-pane
1262: command.
1.1 nicm 1263: .It Xo Ic set-remain-on-exit
1.56 ! jmc 1264: .Op Ic on | off
1.1 nicm 1265: .Xc
1266: Set the
1267: .Ic remain-on-exit
1268: window option for any windows first created in this session.
1269: .It Xo Ic set-titles
1.56 ! jmc 1270: .Op Ic on | off
1.1 nicm 1271: .Xc
1272: Attempt to set the window title using the \ee]2;...\e007 xterm code and
1273: the terminal appears to be an xterm.
1.11 nicm 1274: This option is off by default.
1.6 jmc 1275: Note that elinks
1.1 nicm 1276: will only attempt to set the window title if the STY environment
1277: variable is set.
1278: .It Xo Ic status
1.56 ! jmc 1279: .Op Ic on | off
1.1 nicm 1280: .Xc
1281: Show or hide the status line.
1282: .It Ic status-attr Ar attributes
1283: Set status line attributes.
1284: .It Ic status-bg Ar colour
1285: Set status line background colour.
1286: .It Ic status-fg Ar colour
1287: Set status line foreground colour.
1288: .It Ic status-interval Ar interval
1289: Update the status bar every
1290: .Ar interval
1291: seconds.
1292: By default, updates will occur every 15 seconds.
1293: A setting of zero disables redrawing at interval.
1.41 nicm 1294: .It Xo Ic status-justify
1.56 ! jmc 1295: .Op Ic left | centre | right
1.41 nicm 1296: .Xc
1297: Set the position of the window list component of the status line: left, centre
1298: or right justified.
1.1 nicm 1299: .It Xo Ic status-keys
1.56 ! jmc 1300: .Op Ic vi | emacs
1.1 nicm 1301: .Xc
1.6 jmc 1302: Use vi or emacs-style
1.1 nicm 1303: key bindings in the status line, for example at the command prompt.
1304: Defaults to emacs.
1305: .It Ic status-left Ar string
1306: Display
1307: .Ar string
1308: to the left of the status bar.
1309: .Ar string
1310: will be passed through
1311: .Xr strftime 3
1312: before being used.
1313: By default, the session name is shown.
1314: .Ar string
1315: may contain any of the following special character pairs:
1316: .Bl -column "Character pair" "Replaced with" -offset indent
1317: .It Sy "Character pair" Ta Sy "Replaced with"
1318: .It Li "#(command)" Ta "First line of command's output"
1319: .It Li "#H" Ta "Hostname of local host"
1.35 nicm 1320: .It Li "#I" Ta "Current window index"
1321: .It Li "#P" Ta "Current pane index"
1.1 nicm 1322: .It Li "#S" Ta "Session name"
1323: .It Li "#T" Ta "Current window title"
1.35 nicm 1324: .It Li "#W" Ta "Current window name"
1.1 nicm 1325: .It Li "##" Ta "A literal" Ql #
1326: .El
1327: .Pp
1328: Where appropriate, these may be prefixed with a number to specify the maximum
1329: length, for example
1330: .Ql #24T .
1.10 nicm 1331: .Pp
1.12 jmc 1332: By default, UTF-8 in
1.10 nicm 1333: .Ar string
1334: is not interpreted, to enable UTF-8, use the
1335: .Ic status-utf8
1336: option.
1.1 nicm 1337: .It Ic status-left-length Ar length
1338: Set the maximum
1339: .Ar length
1340: of the left component of the status bar.
1341: The default is 10.
1342: .It Ic status-right Ar string
1343: Display
1344: .Ar string
1345: to the right of the status bar.
1346: By default, the date and time will be shown.
1347: As with
1348: .Ic status-left ,
1349: .Ar string
1350: will be passed to
1.10 nicm 1351: .Xr strftime 3 ,
1352: character pairs are replaced, and UTF-8 is dependent on the
1353: .Ic status-utf8
1354: option.
1.1 nicm 1355: .It Ic status-right-length Ar length
1356: Set the maximum
1357: .Ar length
1358: of the right component of the status bar.
1359: The default is 40.
1.10 nicm 1360: .Pp
1361: .It Xo Ic status-utf8
1.56 ! jmc 1362: .Op Ic on | off
1.10 nicm 1363: .Xc
1364: Instruct
1365: .Nm
1366: to treat top-bit-set characters in the
1367: .Ic status-left
1368: and
1369: .Ic status-right
1370: strings as UTF-8; notably, this is important for wide characters.
1371: This option defaults to off.
1.55 jmc 1372: .It Ic terminal-overrides Ar string
1.54 nicm 1373: Contains a list of entries which override terminal descriptions read using
1374: .Xr terminfo 5 .
1375: .Ar string
1376: is a comma-separated list of items each a colon-separated string made up of a
1377: terminal type pattern (matched using
1378: .Xr fnmatch 3 )
1379: and a set of
1380: .Em name=value
1381: entries.
1382: .Pp
1383: For example, to set the
1384: .Ql clear
1385: .Xr terminfo 5
1386: entry to
1387: .Ql \ee[H\ee[2J
1388: for all terminal types and the
1389: .Ql dch1
1390: entry to
1391: .Ql \ee[P
1.55 jmc 1392: for the
1.54 nicm 1393: .Ql rxvt
1394: terminal type, the option could be set to the string:
1395: .Bd -literal -offset indent
1396: "*:clear=\ee[H\ee[2J,rxvt:dch1=\ee[P"
1397: .Ed
1398: .Pp
1399: The terminal entry value is passed through
1400: .Xr strunvis 3
1401: before interpretation.
1402: The default value forcibly corrects the
1403: .Ql colors
1404: entry for terminals which support 88 or 256 colours:
1405: .Bd -literal -offset indent
1406: "*88col*:colors=88,*256col*:colors=256"
1407: .Ed
1.37 nicm 1408: .It Xo Ic visual-activity
1.56 ! jmc 1409: .Op Ic on | off
1.37 nicm 1410: .Xc
1411: If on, display a status line message when activity occurs in a window
1.39 jmc 1412: for which the
1.37 nicm 1413: .Ic monitor-activity
1414: window option is enabled.
1415: .It Xo Ic visual-bell
1.56 ! jmc 1416: .Op Ic on | off
1.37 nicm 1417: .Xc
1418: If this option is on, a message is shown on a bell instead of it being passed
1419: through to the terminal (which normally makes a sound).
1420: Also see the
1421: .Ic bell-action
1422: option.
1423: .It Xo Ic visual-content
1.56 ! jmc 1424: .Op Ic on | off
1.37 nicm 1425: .Xc
1426: Like
1427: .Ic visual-activity ,
1428: display a message when content is present in a window
1.39 jmc 1429: for which the
1.37 nicm 1430: .Ic monitor-content
1431: window option is enabled.
1.1 nicm 1432: .El
1433: .It Xo Ic set-password
1434: .Op Fl c
1435: .Ar password
1436: .Xc
1437: .D1 (alias: Ic pass )
1438: Set the server password.
1439: If the
1440: .Fl c
1441: option is given, a pre-encrypted password may be specified.
1442: By default, the password is blank, thus any entered password will be accepted
1443: when unlocking the server (see the
1444: .Ic lock-server
1445: command).
1446: To prevent variable expansion when an encrypted password is read from a
1447: configuration file, enclose it in single quotes (').
1448: .It Xo Ic set-window-option
1449: .Op Fl gu
1450: .Op Fl t Ar target-window
1451: .Ar option Ar value
1452: .Xc
1453: .D1 (alias: Ic setw )
1.18 nicm 1454: Set a window option.
1.1 nicm 1455: The
1456: .Fl g
1457: and
1458: .Fl u
1459: flags work similarly to the
1460: .Ic set-option
1461: command.
1462: .Pp
1.18 nicm 1463: Supported window options are:
1.56 ! jmc 1464: .Pp
! 1465: .Bl -tag -width Ds -compact
1.1 nicm 1466: .It Xo Ic aggressive-resize
1.56 ! jmc 1467: .Op Ic on | off
1.1 nicm 1468: .Xc
1469: Aggressively resize the chosen window.
1470: This means that
1471: .Nm
1472: will resize the window to the size of the smallest session for which it is the
1473: current window, rather than the smallest session to which it is attached.
1474: The window may resize when the current window is changed on another sessions;
1.6 jmc 1475: this option is good for full-screen programs which support
1476: .Dv SIGWINCH
1477: and poor for interactive programs such as shells.
1.56 ! jmc 1478: .Pp
1.1 nicm 1479: .It Xo Ic automatic-rename
1.56 ! jmc 1480: .Op Ic on | off
1.1 nicm 1481: .Xc
1482: Control automatic window renaming.
1483: When this setting is enabled,
1484: .Nm
1485: will attempt - on supported platforms - to rename the window to reflect the
1486: command currently running in it.
1487: This flag is automatically disabled for an individual window when a name
1488: is specified at creation with
1489: .Ic new-window or
1490: .Ic new-session ,
1491: or later with
1492: .Ic rename-window .
1493: It may be switched off globally with:
1494: .Bd -literal -offset indent
1495: set-window-option -g automatic-rename off
1496: .Ed
1.56 ! jmc 1497: .Pp
1.1 nicm 1498: .It Ic clock-mode-colour Ar colour
1499: Set clock colour.
1.56 ! jmc 1500: .Pp
1.1 nicm 1501: .It Xo Ic clock-mode-style
1.56 ! jmc 1502: .Op Ic 12 | 24
1.1 nicm 1503: .Xc
1504: Set clock hour format.
1.56 ! jmc 1505: .Pp
1.1 nicm 1506: .It Ic force-height Ar height
1507: .It Ic force-width Ar width
1508: Prevent
1509: .Nm
1510: from resizing a window to greater than
1511: .Ar width
1512: or
1513: .Ar height .
1514: A value of zero restores the default unlimited setting.
1.56 ! jmc 1515: .Pp
1.2 nicm 1516: .It Ic main-pane-width Ar width
1517: .It Ic main-pane-height Ar height
1518: Set the width or height of the main (left or top) pane in the
1519: .Ic main-horizontal
1520: or
1521: .Ic main-vertical
1522: layouts.
1.56 ! jmc 1523: .Pp
1.1 nicm 1524: .It Ic mode-attr Ar attributes
1525: Set window modes attributes.
1.56 ! jmc 1526: .Pp
1.1 nicm 1527: .It Ic mode-bg Ar colour
1528: Set window modes background colour.
1.56 ! jmc 1529: .Pp
1.1 nicm 1530: .It Ic mode-fg Ar colour
1531: Set window modes foreground colour.
1.56 ! jmc 1532: .Pp
1.1 nicm 1533: .It Xo Ic mode-keys
1.56 ! jmc 1534: .Op Ic vi | emacs
1.1 nicm 1535: .Xc
1.50 nicm 1536: Use vi or emacs-style key bindings in scroll, copy and choice modes.
1.1 nicm 1537: Key bindings default to emacs.
1.56 ! jmc 1538: .Pp
1.50 nicm 1539: .It Xo Ic mode-mouse
1.56 ! jmc 1540: .Op Ic on | off
1.50 nicm 1541: .Xc
1.51 jmc 1542: Mouse state in modes.
1543: If on,
1.50 nicm 1544: .Nm
1545: will respond to mouse clicks by moving the cursor in copy mode or selecting an
1546: option in choice mode.
1.56 ! jmc 1547: .Pp
1.1 nicm 1548: .It Xo Ic monitor-activity
1.56 ! jmc 1549: .Op Ic on | off
1.1 nicm 1550: .Xc
1551: Monitor for activity in the window.
1552: Windows with activity are highlighted in the status line.
1.56 ! jmc 1553: .Pp
! 1554: .It Ic monitor-content Ar match-string
1.6 jmc 1555: Monitor content in the window.
1556: When
1.16 nicm 1557: .Xr fnmatch 3
1558: pattern
1.1 nicm 1559: .Ar match-string
1560: appears in the window, it is highlighted in the status line.
1.56 ! jmc 1561: .Pp
1.1 nicm 1562: .It Xo Ic remain-on-exit
1.56 ! jmc 1563: .Op Ic on | off
1.1 nicm 1564: .Xc
1565: A window with this flag set is not destroyed when the program running in it
1566: exits.
1567: The window may be reactivated with the
1568: .Ic respawn-window
1569: command.
1.56 ! jmc 1570: .Pp
1.1 nicm 1571: .It Xo Ic utf8
1.56 ! jmc 1572: .Op Ic on | off
1.1 nicm 1573: .Xc
1574: Instructs
1575: .Nm
1576: to expect UTF-8 sequences to appear in this window.
1.56 ! jmc 1577: .Pp
1.1 nicm 1578: .It Ic window-status-attr Ar attributes
1579: Set status line attributes for a single window.
1.56 ! jmc 1580: .Pp
1.1 nicm 1581: .It Ic window-status-bg Ar colour
1582: Set status line background colour for a single window.
1.56 ! jmc 1583: .Pp
1.1 nicm 1584: .It Ic window-status-fg Ar colour
1585: Set status line foreground colour for a single window.
1.56 ! jmc 1586: .Pp
1.40 nicm 1587: .It Ic window-status-current-attr Ar attributes
1588: Set status line attributes for the currently active window.
1.56 ! jmc 1589: .Pp
1.40 nicm 1590: .It Ic window-status-current-bg Ar colour
1591: Set status line background colour for the currently active window.
1.56 ! jmc 1592: .Pp
1.40 nicm 1593: .It Ic window-status-current-fg Ar colour
1594: Set status line foreground colour for the currently active window.
1.56 ! jmc 1595: .Pp
1.1 nicm 1596: .It Xo Ic xterm-keys
1.56 ! jmc 1597: .Op Ic on | off
1.1 nicm 1598: .Xc
1599: If this option is set,
1600: .Nm
1601: will generate
1602: .Xr xterm 1 -style
1603: function key sequences; these have a number included to indicate modifiers such
1.6 jmc 1604: as Shift, Alt or Ctrl.
1.1 nicm 1605: .El
1606: .It Xo Ic show-buffer
1607: .Op Fl b Ar buffer-index
1608: .Op Fl t Ar target-session
1609: .Xc
1610: .D1 (alias: Ic showb )
1611: Display the contents of the specified buffer.
1612: .It Xo Ic show-options
1.18 nicm 1613: .Op Fl g
1.1 nicm 1614: .Op Fl t Ar target-session
1615: .Xc
1616: .D1 (alias: Ic show )
1.18 nicm 1617: Show the session options for
1618: .Ar target session ,
1619: or the global session options with
1620: .Fl g .
1.1 nicm 1621: .It Xo Ic show-window-options
1.18 nicm 1622: .Op Fl g
1.1 nicm 1623: .Op Fl t Ar target-window
1624: .Xc
1625: .D1 (alias: Ic showw )
1.18 nicm 1626: List the window options for
1627: .Ar target-window ,
1628: or the global window options if
1629: .Fl g
1630: is used.
1.56 ! jmc 1631: .It Ic source-file Ar path
1.1 nicm 1632: .D1 (alias: Ic source )
1633: Execute commands from
1634: .Ar path .
1635: .It Xo Ic split-window
1.38 nicm 1636: .Op Fl dhv
1.1 nicm 1637: .Oo Fl l
1.38 nicm 1638: .Ar size |
1.1 nicm 1639: .Fl p Ar percentage Oc
1640: .Op Fl t Ar target-window
1641: .Op Ar command
1642: .Xc
1643: .D1 (alias: splitw )
1.38 nicm 1644: Creates a new pane by splitting the active pane:
1645: .Fl h
1646: does a horizontal split and
1647: .Fl v
1648: a vertical split; if neither is specified,
1649: .Fl v
1650: is assumed.
1.1 nicm 1651: The
1652: .Fl l
1653: and
1654: .Fl p
1.38 nicm 1655: options specify the size of the new window in lines (for vertical split) or in
1656: cells (for horizontal split), or as a percentage, respectively.
1.1 nicm 1657: All other options have the same meaning as in the
1658: .Ic new-window
1659: command.
1.56 ! jmc 1660: .It Ic start-server
1.1 nicm 1661: .D1 (alias: Ic start )
1662: Start the
1663: .Nm
1664: server, if not already running, without creating any sessions.
1665: .It Xo Ic suspend-client
1.56 ! jmc 1666: .Op Fl c Ar target-client
1.1 nicm 1667: .Xc
1668: .D1 (alias: Ic suspendc )
1.6 jmc 1669: Suspend a client by sending
1670: .Dv SIGTSTP
1671: (tty stop).
1.1 nicm 1672: .It Xo Ic swap-pane
1673: .Op Fl dDU
1.52 nicm 1674: .Op Fl s Ar src-pane
1675: .Op Fl t Ar dst-pane
1.1 nicm 1676: .Xc
1677: .D1 (alias: Ic swapp )
1.52 nicm 1678: Swap two panes.
1.1 nicm 1679: If
1680: .Fl U
1.52 nicm 1681: is used and no source pane is specified with
1682: .Fl s ,
1.53 jmc 1683: .Ar dst-pane
1684: is swapped with the previous pane (before it numerically);
1.1 nicm 1685: .Fl D
1.52 nicm 1686: swaps with the next pane (after it numerically).
1.1 nicm 1687: .It Xo Ic swap-window
1688: .Op Fl d
1689: .Op Fl s Ar src-window
1690: .Op Fl t Ar dst-window
1691: .Xc
1692: .D1 (alias: Ic swapw )
1693: This is similar to
1694: .Ic link-window ,
1695: except the source and destination windows are swapped.
1696: It is an error if no window exists at
1697: .Ar src-window .
1698: .It Xo Ic switch-client
1.32 nicm 1699: .Op Fl c Ar target-client
1700: .Op Fl t Ar target-session
1.1 nicm 1701: .Xc
1702: .D1 (alias: Ic switchc )
1703: Switch the current session for client
1704: .Ar target-client
1705: to
1706: .Ar target-session .
1707: .It Xo Ic unbind-key
1.49 nicm 1708: .Op Fl cn
1709: .Op Fl t Ar key-table
1.1 nicm 1710: .Ar key
1711: .Xc
1712: .D1 (alias: Ic unbind )
1.42 nicm 1713: Unbind the command bound to
1.1 nicm 1714: .Ar key .
1.49 nicm 1715: Without
1716: .Fl t
1717: the primary key bindings are modified; in this case, if
1.45 nicm 1718: .Fl n
1719: is specified, the command bound to
1720: .Ar key
1721: without a prefix (if any) is removed.
1.49 nicm 1722: .Pp
1723: If
1724: .Fl t
1725: is present,
1726: .Ar key
1727: in
1728: .Ar key-table
1729: is unbound: the binding for command mode with
1730: .Fl c
1731: or for normal mode without.
1.1 nicm 1732: .It Xo Ic unlink-window
1.31 nicm 1733: .Op Fl k
1.1 nicm 1734: .Op Fl t Ar target-window
1735: .Xc
1736: .D1 (alias: Ic unlinkw )
1737: Unlink
1738: .Ar target-window .
1.31 nicm 1739: Unless
1740: .Fl k
1741: is given, a window may be unlinked only if it is linked to multiple sessions -
1742: windows may not be linked to no sessions;
1743: if
1744: .Fl k
1745: is specified and the window is linked to only one session, it is unlinked and
1746: destroyed.
1.56 ! jmc 1747: .It Ic up-pane Op Fl t Ar target-pane
1.1 nicm 1748: .D1 (alias: Ic upp )
1749: Move up a pane.
1750: .El
1751: .Sh FILES
1.26 nicm 1752: .Bl -tag -width "/etc/tmux.confXXX" -compact
1.1 nicm 1753: .It Pa ~/.tmux.conf
1.6 jmc 1754: Default
1.1 nicm 1755: .Nm
1.6 jmc 1756: configuration file.
1.26 nicm 1757: .It Pa /etc/tmux.conf
1758: System-wide configuration file.
1.1 nicm 1759: .El
1760: .Sh SEE ALSO
1761: .Xr pty 4
1762: .Sh AUTHORS
1763: .An Nicholas Marriott Aq nicm@users.sourceforge.net