Annotation of src/usr.bin/tmux/tmux.1, Revision 1.54
1.54 ! nicm 1: .\" $OpenBSD: tmux.1,v 1.53 2009/07/30 16:59:24 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.51 jmc 17: .Dd $Mdocdate: July 30 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.
713: .It Xo Ic choose-session
714: .Op Fl t Ar target-window
715: .Xc
716: Put a window into session choice mode, where the session for the current
717: client may be selected interactively from a list.
718: This command works only from inside
719: .Nm .
720: .It Xo Ic choose-window
721: .Op Fl t Ar target-window
722: .Xc
723: Put a window into window choice mode, where the window for the session
724: attached to the current client may be selected interactively from a list.
725: This command works only from inside
726: .Nm .
1.2 nicm 727: .It Xo Ic clear-history
1.52 nicm 728: .Op Fl t Ar target-pane
1.2 nicm 729: .Xc
1.17 nicm 730: .D1 (alias: Ic clearhist )
1.2 nicm 731: Remove and free the history for the specified pane.
1.1 nicm 732: .It Xo Ic clock-mode
733: .Op Fl t Ar target-window
734: .Xc
735: Display a large clock.
736: .It Xo Ic command-prompt
737: .Op Fl t Ar target-client
738: .Op Ar template
739: .Xc
740: Open the command prompt in a client.
741: This may be used from inside
742: .Nm
743: to execute commands interactively.
744: If
745: .Ar template
746: is specified, it is used as the command; any %% in the template will be
747: replaced by what is entered at the prompt.
748: .It Xo Ic confirm-before
749: .Op Fl t Ar target-client
750: .Ar command
751: .Xc
1.17 nicm 752: .D1 (alias: Ic confirm )
1.1 nicm 753: Ask for confirmation before executing
754: .Ar command .
755: This command works only from inside
756: .Nm .
757: .It Xo Ic copy-buffer
758: .Op Fl a Ar src-index
759: .Op Fl b Ar dst-index
760: .Op Fl s Ar src-session
761: .Op Fl t Ar dst-session
762: .Xc
1.17 nicm 763: .D1 (alias: Ic copyb )
1.1 nicm 764: Copy a session paste buffer to another session.
765: If no sessions are specified, the current one is used instead.
766: .It Xo Ic copy-mode
767: .Op Fl u
768: .Op Fl t Ar target-window
769: .Xc
770: Enter copy mode.
771: The
772: .Fl u
773: option scrolls one page up.
774: .It Xo Ic delete-buffer
775: .Op Fl b Ar buffer-index
776: .Op Fl t Ar target-session
777: .Xc
778: .D1 (alias: Ic deleteb )
779: Delete the buffer at
780: .Ar buffer-index ,
781: or the top buffer if not specified.
782: .It Xo Ic detach-client
783: .Op Fl t Ar target-client
784: .Xc
785: .D1 (alias: Ic detach )
786: Detach the current client if bound to a key, or the specified client with
787: .Fl t .
1.35 nicm 788: .It Xo Ic display-message
789: .Op Fl t Ar target-client
790: .Op Ar message
791: .Xc
792: .D1 (alias: Ic display )
793: Display a message (see the
794: .Ic status-left
795: option below)
796: in the status line.
1.1 nicm 797: .It Xo Ic down-pane
1.52 nicm 798: .Op Fl t Ar target-pane
1.1 nicm 799: .Xc
800: .D1 (alias: Ic downp )
801: Move down a pane.
802: .It Xo Ic find-window
803: .Op Fl t Ar target-window
804: .Ar match-string
805: .Xc
806: .D1 (alias: Ic findw )
1.16 nicm 807: Search for the
808: .Xr fnmatch 3
809: pattern
1.1 nicm 810: .Ar match-string
811: in window names, titles, and visible content (but not history).
812: If only one window is matched, it'll be automatically selected, otherwise a
813: choice list is shown.
814: This command only works from inside
815: .Nm .
816: .It Xo Ic has-session
817: .Op Fl t Ar target-session
818: .Xc
819: .D1 (alias: Ic has )
820: Report an error and exit with 1 if the specified session does not exist.
821: If it does exist, exit with 0.
1.20 nicm 822: .It Xo Ic if-shell
823: .Ar shell-command
824: .Ar command
825: .Xc
826: .D1 (alias: Ic if )
827: Execute
828: .Ar command
829: if
830: .Ar shell-command
831: returns success.
1.1 nicm 832: .It Xo Ic kill-pane
1.52 nicm 833: .Op Fl t Ar target-pane
1.1 nicm 834: .Xc
835: .D1 (alias: Ic killp )
836: Destroy the given pane.
1.36 nicm 837: If no panes remain in the containing window, it is also destroyed.
1.1 nicm 838: .It Xo Ic kill-server
839: .Xc
840: Kill the
841: .Nm
842: server and clients and destroy all sessions.
843: .It Xo Ic kill-session
844: .Op Fl t Ar target-session
845: .Xc
846: Destroy the given session, closing any windows linked to it and no other
847: sessions, and detaching all clients attached to it.
848: .It Xo Ic kill-window
849: .Op Fl t Ar target-window
850: .Xc
851: .D1 (alias: Ic killw )
852: Kill the current window or the window at
853: .Ar target-window ,
854: removing it from any sessions to which it is linked.
855: .It Xo Ic last-window
856: .Op Fl t Ar target-session
857: .Xc
858: .D1 (alias: Ic last )
859: Select the last (previously selected) window.
860: If no
861: .Ar target-session
862: is specified, select the last window of the current session.
863: .It Xo Ic link-window
864: .Op Fl dk
865: .Op Fl s Ar src-window
866: .Op Fl t Ar dst-window
867: .Xc
868: .D1 (alias: Ic linkw )
869: Link the window at
870: .Ar src-window
871: to the specified
872: .Ar dst-window .
873: If
874: .Ar dst-window
875: is specified and no such window exists, the
876: .Ar src-window
877: is linked there.
878: If
879: .Fl k
880: is given and
881: .Ar dst-window
882: exists, it is killed, otherwise an error is generated.
883: If
884: .Fl d
885: is given, the newly linked window is not selected.
886: .It Xo Ic list-buffers
887: .Op Fl t Ar target-session
888: .Xc
889: .D1 (alias: Ic lsb )
890: List the buffers in the given session.
891: .It Xo Ic list-clients
892: .Xc
893: .D1 (alias: Ic lsc )
894: List all clients attached to the server.
895: .It Xo Ic list-commands
896: .Xc
897: .D1 (alias: Ic lscm )
898: List the syntax of all commands supported by
899: .Nm .
900: .It Xo Ic list-keys
1.49 nicm 901: .Op Fl t Ar key-table
1.1 nicm 902: .Xc
903: .D1 (alias: Ic lsk )
904: List all key bindings.
1.48 nicm 905: Without
906: .Fl t
907: the primary key bindings - those executed when preceded by the prefix key -
908: are printed.
1.45 nicm 909: Keys bound without the prefix key (see
910: .Ic bind-key
911: .Fl n )
912: are enclosed in square brackets.
1.48 nicm 913: .Pp
914: With
915: .Fl t ,
916: the key bindings in
917: .Ar key-table
918: are listed; this may be one of:
919: .Em vi-edit ,
920: .Em emacs-edit ,
921: .Em vi-choice ,
922: .Em emacs-choice ,
923: .Em vi-copy
924: or
925: .Em emacs-copy .
1.1 nicm 926: .It Xo Ic list-sessions
927: .Xc
928: .D1 (alias: Ic ls )
929: List all sessions managed by the server.
930: .It Xo Ic list-windows
931: .Op Fl t Ar target-session
932: .Xc
933: .D1 (alias: Ic lsw )
934: List windows in the current session or in
935: .Ar target-session .
936: .It Xo Ic load-buffer
937: .Op Fl b Ar buffer-index
938: .Op Fl t Ar target-session
939: .Ar path
940: .Xc
941: .D1 (alias: Ic loadb )
942: Load the contents of the specified paste buffer from
943: .Ar path .
944: .It Xo Ic lock-server
945: .Xc
946: .D1 (alias: Ic lock )
947: Lock the server until a password is entered.
948: .It Xo Ic move-window
949: .Op Fl d
950: .Op Fl s Ar src-window
951: .Op Fl t Ar dst-window
952: .Xc
953: .D1 (alias: Ic movew )
954: This is similar to
955: .Ic link-window ,
956: except the window at
957: .Ar src-window
958: is moved to
959: .Ar dst-window .
960: .It Xo Ic new-session
961: .Op Fl d
962: .Op Fl n Ar window-name
963: .Op Fl s Ar session-name
964: .Op Ar command
965: .Xc
966: .D1 (alias: Ic new )
967: Create a new session with name
968: .Ar session-name .
969: The new session is attached to the current terminal unless
970: .Fl d
971: is given.
972: .Ar window-name
973: and
974: .Ar command
975: are the name of and command to execute in the initial window.
976: .It Xo Ic new-window
1.28 nicm 977: .Op Fl dk
1.1 nicm 978: .Op Fl n Ar window-name
979: .Op Fl t Ar target-window
980: .Op Ar command
981: .Xc
982: .D1 (alias: Ic neww )
983: Create a new window.
984: If
985: .Fl d
986: is given, the session does not make the new window the current window.
987: .Ar target-window
1.28 nicm 988: represents the window to be created; if the target already exists an error is
989: shown, unless the
990: .Fl k
991: flag is used, in which case it is destroyed.
1.1 nicm 992: .Ar command
993: is the command to execute.
994: If
995: .Ar command
996: is not specified, the default command is used.
997: .Pp
998: The
999: .Ev TERM
1000: environment variable must be set to
1001: .Dq screen
1002: for all programs running
1003: .Em inside
1004: .Nm .
1005: New windows will automatically have
1006: .Dq TERM=screen
1007: added to their environment, but care must be taken not to reset this in shell
1008: start-up files.
1009: .It Xo Ic next-layout
1010: .Op Fl t Ar target-window
1011: .Xc
1012: .D1 (alias: Ic nextl )
1013: Move a window to the next layout and rearrange the panes to fit.
1014: .It Xo Ic next-window
1.9 nicm 1015: .Op Fl a
1.1 nicm 1016: .Op Fl t Ar target-session
1017: .Xc
1018: .D1 (alias: Ic next )
1019: Move to the next window in the session.
1.9 nicm 1020: If
1.12 jmc 1021: .Fl a
1.9 nicm 1022: is used, move to the next window with a bell, activity or content alert.
1.1 nicm 1023: .It Xo Ic paste-buffer
1.25 nicm 1024: .Op Fl dr
1.1 nicm 1025: .Op Fl b Ar buffer-index
1026: .Op Fl t Ar target-window
1027: .Xc
1028: .D1 (alias: Ic pasteb )
1029: Insert the contents of a paste buffer into the current window.
1.23 nicm 1030: With
1031: .Fl d ,
1032: also delete the paste buffer from the stack.
1.24 nicm 1033: When output, any linefeed (LF) characters in the paste buffer are replaced with
1034: carriage returns (CR).
1035: This translation may be disabled with the
1036: .Fl r
1037: flag.
1.1 nicm 1038: .It Xo Ic previous-window
1.9 nicm 1039: .Op Fl a
1.1 nicm 1040: .Op Fl t Ar target-session
1041: .Xc
1042: .D1 (alias: Ic prev )
1043: Move to the previous window in the session.
1.9 nicm 1044: With
1045: .Fl a ,
1046: move to the previous window with a bell, activity or content alert.
1.1 nicm 1047: .It Xo Ic refresh-client
1048: .Op Fl t Ar target-client
1049: .Xc
1050: .D1 (alias: Ic refresh )
1051: Refresh the current client if bound to a key, or a single client if one is given
1052: with
1053: .Fl t .
1054: .It Xo Ic rename-session
1055: .Op Fl t Ar target-session
1056: .Ar new-name
1057: .Xc
1058: .D1 (alias: Ic rename )
1059: Rename the session to
1060: .Ar new-name .
1061: .It Xo Ic rename-window
1062: .Op Fl t Ar target-window
1063: .Ar new-name
1064: .Xc
1065: .D1 (alias: Ic renamew )
1066: Rename the current window, or the window at
1067: .Ar target-window
1068: if specified, to
1069: .Ar new-name .
1070: .It Xo Ic resize-pane
1.39 jmc 1071: .Op Fl DLRU
1.52 nicm 1072: .Op Fl t Ar target-pane
1.1 nicm 1073: .Op Ar adjustment
1074: .Xc
1075: .D1 (alias: Ic resizep )
1076: Resize a pane, upward with
1077: .Fl U
1.38 nicm 1078: (the default), downward with
1079: .Fl D ,
1080: to the left with
1081: .Fl L
1082: and to the right with
1.39 jmc 1083: .Fl R .
1.1 nicm 1084: The
1085: .Ar adjustment
1.38 nicm 1086: is given in lines or cells (the default is 1).
1.1 nicm 1087: .It Xo Ic respawn-window
1088: .Op Fl k
1089: .Op Fl t Ar target-window
1090: .Op Ar command
1091: .Xc
1092: .D1 (alias: Ic respawnw )
1093: Reactive a window in which the command has exited (see the
1094: .Ic remain-on-exit
1095: window option).
1096: If
1097: .Ar command
1098: is not given, the command used when the window was created is executed.
1099: The window must be already inactive, unless
1100: .Fl k
1101: is given, in which case any existing command is killed.
1102: .It Xo Ic rotate-window
1103: .Op Fl DU
1104: .Op Fl t Ar target-window
1105: .Xc
1106: .D1 (alias: Ic rotatew )
1107: Rotate the positions of the panes within a window, either upward (numerically
1108: lower) with
1109: .Fl U
1110: or downward (numerically higher).
1111: .It Xo Ic save-buffer
1112: .Op Fl a
1113: .Op Fl b Ar buffer-index
1114: .Op Fl t Ar target-session
1115: .Ar path
1116: .Xc
1117: .D1 (alias: Ic saveb )
1118: Save the contents of the specified paste buffer to
1119: .Ar path .
1120: The
1121: .Fl a
1122: option appends to rather than overwriting the file.
1123: .It Xo Ic scroll-mode
1124: .Op Fl u
1125: .Op Fl t Ar target-window
1126: .Xc
1127: Enter scroll mode.
1128: The
1129: .Fl u
1130: has the same meaning as in the
1131: .Ic copy-mode
1132: command.
1.2 nicm 1133: .It Xo Ic select-layout
1134: .Op Fl t Ar target-window
1.47 nicm 1135: .Op Ar layout-name
1.2 nicm 1136: .Xc
1.17 nicm 1137: .D1 (alias: selectl )
1.2 nicm 1138: Choose a specific layout for a window.
1.47 nicm 1139: If
1140: .Ar layout-name
1141: is not given, the last layout used (if any) is reapplied.
1.1 nicm 1142: .It Xo Ic select-pane
1.52 nicm 1143: .Op Fl t Ar target-pane
1.1 nicm 1144: .Xc
1145: .D1 (alias: Ic selectp )
1146: Make pane
1.52 nicm 1147: .Ar target-pane
1.1 nicm 1148: the active pane in window
1149: .Ar target-window .
1150: .It Xo Ic select-prompt
1151: .Op Fl t Ar target-client
1152: .Xc
1153: Open a prompt inside
1154: .Ar target-client
1155: allowing a window index to be entered interactively.
1156: .It Xo Ic select-window
1157: .Op Fl t Ar target-window
1158: .Xc
1159: .D1 (alias: Ic selectw )
1160: Select the window at
1161: .Ar target-window .
1162: .It Xo Ic send-keys
1163: .Op Fl t Ar target-window
1164: .Ar key Ar ...
1165: .Xc
1166: .D1 (alias: Ic send )
1167: Send a key or keys to a window.
1168: Each argument
1169: .Ar key
1170: is the name of the key (such as
1171: .Ql C-a
1172: or
1173: .Ql npage
1174: ) to send; if the string is not recognised as a key, it is sent as a series of
1175: characters.
1176: All arguments are sent sequentially from first to last.
1177: .It Xo Ic send-prefix
1178: .Op Fl t Ar target-window
1179: .Xc
1180: Send the prefix key to a window as if it was pressed.
1181: .It Xo Ic server-info
1182: .Xc
1183: .D1 (alias: Ic info )
1184: Show server information and terminal details.
1185: .It Xo Ic set-buffer
1186: .Op Fl b Ar buffer-index
1187: .Op Fl t Ar target-session
1188: .Ar data
1189: .Xc
1190: .D1 (alias: Ic setb )
1191: Set the contents of the specified buffer to
1192: .Ar data .
1193: .It Xo Ic set-option
1194: .Op Fl gu
1195: .Op Fl t Ar target-session
1196: .Ar option Ar value
1197: .Xc
1198: .D1 (alias: Ic set )
1.18 nicm 1199: Set a session option.
1.1 nicm 1200: If
1201: .Fl g
1.18 nicm 1202: is specified, the global session option is set.
1.1 nicm 1203: The
1204: .Fl u
1205: flag unsets an option, so a session inherits the option from the global
1206: options - it is not possible to unset a global option.
1207: .Pp
1.18 nicm 1208: Available session options are:
1.1 nicm 1209: .Bl -tag -width Ds
1210: .It Xo Ic bell-action
1211: .Op Ic any | Ic none | Ic current
1212: .Xc
1213: Set action on window bell.
1214: .Ic any
1215: means a bell in any window linked to a session causes a bell in the current
1216: window of that session,
1217: .Ic none
1218: means all bells are ignored and
1219: .Ic current
1220: means only bell in windows other than the current window are ignored.
1221: .It Ic buffer-limit Ar number
1222: Set the number of buffers kept for each session; as new buffers are added to
1223: the top of the stack, old ones are removed from the bottom if necessary to
1224: maintain this maximum length.
1225: .It Ic default-command Ar command
1226: Set the command used for new windows (if not specified when the window is
1227: created) to
1228: .Ar command .
1.19 nicm 1229: The default is an empty string, which instructs
1230: .Nm
1231: to create a login shell using the
1232: .Ev SHELL
1233: environment variable or, if it is unset, the user's shell returned by
1234: .Xr getpwuid 3 .
1.1 nicm 1235: .It Ic default-path Ar path
1236: Set the default working directory for processes created from keys, or
1237: interactively from the prompt.
1238: The default is the current working directory when the server is started.
1.22 nicm 1239: .It Ic default-terminal Ar terminal
1240: Set the default terminal for new windows created in this session - the
1241: default value of the
1242: .Ev TERM
1243: environment variable.
1244: For
1245: .Nm
1246: to work correctly, this
1247: .Em must
1248: be set to
1249: .Ql screen
1250: or a derivative of it.
1.21 nicm 1251: .It Ic display-time Ar time
1252: Set the amount of time for which status line messages are displayed.
1253: .Ar time
1254: is in milliseconds.
1.1 nicm 1255: .It Ic history-limit Ar lines
1256: Set the maximum number of lines held in window history.
1257: This setting applies only to new windows - existing window histories are not
1258: resized and retain the limit at the point they were created.
1259: .It Ic lock-after-time Ar number
1260: Lock the server after
1261: .Ar number
1262: seconds of inactivity.
1263: The default is off (set to 0).
1264: This has no effect as a session option; it must be set as a global option using
1265: .Fl g .
1266: .It Ic message-attr Ar attributes
1267: Set status line message attributes, where
1268: .Ar attributes
1269: is either
1270: .Ic default
1271: or a comma-delimited list of one or more of:
1272: .Ic bright
1273: (or
1274: .Ic bold ) ,
1275: .Ic dim ,
1276: .Ic underscore ,
1277: .Ic blink ,
1278: .Ic reverse ,
1279: .Ic hidden ,
1280: or
1281: .Ic italics .
1282: .It Ic message-bg Ar colour
1283: Set status line message background colour, where
1284: .Ar colour
1285: is one of:
1286: .Ic black ,
1287: .Ic red ,
1288: .Ic green ,
1289: .Ic yellow ,
1290: .Ic blue ,
1291: .Ic magenta ,
1292: .Ic cyan ,
1293: .Ic white
1294: or
1295: .Ic default .
1296: .It Ic message-fg Ar colour
1297: Set status line message foreground colour.
1298: .It Ic prefix Ar key
1299: Set the current prefix key.
1.21 nicm 1300: .It Ic repeat-time Ar time
1.1 nicm 1301: Allow multiple commands to be entered without pressing the prefix-key again
1302: in the specified
1.21 nicm 1303: .Ar time
1.1 nicm 1304: milliseconds (the default is 500).
1305: Whether a key repeats may be set when it is bound using the
1306: .Fl r
1307: flag to
1308: .Ic bind-key .
1.52 nicm 1309: Repeat is enabled for the default keys bound to the
1310: .Ic resize-pane
1311: command.
1.1 nicm 1312: .It Xo Ic set-remain-on-exit
1313: .Op Ic on | Ic off
1314: .Xc
1315: Set the
1316: .Ic remain-on-exit
1317: window option for any windows first created in this session.
1318: .It Xo Ic set-titles
1319: .Op Ic on | Ic off
1320: .Xc
1321: Attempt to set the window title using the \ee]2;...\e007 xterm code and
1322: the terminal appears to be an xterm.
1.11 nicm 1323: This option is off by default.
1.6 jmc 1324: Note that elinks
1.1 nicm 1325: will only attempt to set the window title if the STY environment
1326: variable is set.
1327: .It Xo Ic status
1328: .Op Ic on | Ic off
1329: .Xc
1330: Show or hide the status line.
1331: .It Ic status-attr Ar attributes
1332: Set status line attributes.
1333: .It Ic status-bg Ar colour
1334: Set status line background colour.
1335: .It Ic status-fg Ar colour
1336: Set status line foreground colour.
1337: .It Ic status-interval Ar interval
1338: Update the status bar every
1339: .Ar interval
1340: seconds.
1341: By default, updates will occur every 15 seconds.
1342: A setting of zero disables redrawing at interval.
1.41 nicm 1343: .It Xo Ic status-justify
1344: .Op Ic left | Ic centre | Ic right
1345: .Xc
1346: Set the position of the window list component of the status line: left, centre
1347: or right justified.
1.1 nicm 1348: .It Xo Ic status-keys
1349: .Op Ic vi | Ic emacs
1350: .Xc
1.6 jmc 1351: Use vi or emacs-style
1.1 nicm 1352: key bindings in the status line, for example at the command prompt.
1353: Defaults to emacs.
1354: .It Ic status-left Ar string
1355: Display
1356: .Ar string
1357: to the left of the status bar.
1358: .Ar string
1359: will be passed through
1360: .Xr strftime 3
1361: before being used.
1362: By default, the session name is shown.
1363: .Ar string
1364: may contain any of the following special character pairs:
1365: .Bl -column "Character pair" "Replaced with" -offset indent
1366: .It Sy "Character pair" Ta Sy "Replaced with"
1367: .It Li "#(command)" Ta "First line of command's output"
1368: .It Li "#H" Ta "Hostname of local host"
1.35 nicm 1369: .It Li "#I" Ta "Current window index"
1370: .It Li "#P" Ta "Current pane index"
1.1 nicm 1371: .It Li "#S" Ta "Session name"
1372: .It Li "#T" Ta "Current window title"
1.35 nicm 1373: .It Li "#W" Ta "Current window name"
1.1 nicm 1374: .It Li "##" Ta "A literal" Ql #
1375: .El
1376: .Pp
1377: Where appropriate, these may be prefixed with a number to specify the maximum
1378: length, for example
1379: .Ql #24T .
1.10 nicm 1380: .Pp
1.12 jmc 1381: By default, UTF-8 in
1.10 nicm 1382: .Ar string
1383: is not interpreted, to enable UTF-8, use the
1384: .Ic status-utf8
1385: option.
1.1 nicm 1386: .It Ic status-left-length Ar length
1387: Set the maximum
1388: .Ar length
1389: of the left component of the status bar.
1390: The default is 10.
1391: .It Ic status-right Ar string
1392: Display
1393: .Ar string
1394: to the right of the status bar.
1395: By default, the date and time will be shown.
1396: As with
1397: .Ic status-left ,
1398: .Ar string
1399: will be passed to
1.10 nicm 1400: .Xr strftime 3 ,
1401: character pairs are replaced, and UTF-8 is dependent on the
1402: .Ic status-utf8
1403: option.
1.1 nicm 1404: .It Ic status-right-length Ar length
1405: Set the maximum
1406: .Ar length
1407: of the right component of the status bar.
1408: The default is 40.
1.10 nicm 1409: .Pp
1410: .It Xo Ic status-utf8
1411: .Op Ic on | Ic off
1412: .Xc
1413: Instruct
1414: .Nm
1415: to treat top-bit-set characters in the
1416: .Ic status-left
1417: and
1418: .Ic status-right
1419: strings as UTF-8; notably, this is important for wide characters.
1420: This option defaults to off.
1.54 ! nicm 1421: .It Xo Ic terminal-overrides
! 1422: .Ar string
! 1423: .Xc
! 1424: Contains a list of entries which override terminal descriptions read using
! 1425: .Xr terminfo 5 .
! 1426: .Ar string
! 1427: is a comma-separated list of items each a colon-separated string made up of a
! 1428: terminal type pattern (matched using
! 1429: .Xr fnmatch 3 )
! 1430: and a set of
! 1431: .Em name=value
! 1432: entries.
! 1433: .Pp
! 1434: For example, to set the
! 1435: .Ql clear
! 1436: .Xr terminfo 5
! 1437: entry to
! 1438: .Ql \ee[H\ee[2J
! 1439: for all terminal types and the
! 1440: .Ql dch1
! 1441: entry to
! 1442: .Ql \ee[P
! 1443: for the
! 1444: .Ql rxvt
! 1445: terminal type, the option could be set to the string:
! 1446: .Bd -literal -offset indent
! 1447: "*:clear=\ee[H\ee[2J,rxvt:dch1=\ee[P"
! 1448: .Ed
! 1449: .Pp
! 1450: The terminal entry value is passed through
! 1451: .Xr strunvis 3
! 1452: before interpretation.
! 1453: The default value forcibly corrects the
! 1454: .Ql colors
! 1455: entry for terminals which support 88 or 256 colours:
! 1456: .Bd -literal -offset indent
! 1457: "*88col*:colors=88,*256col*:colors=256"
! 1458: .Ed
1.37 nicm 1459: .It Xo Ic visual-activity
1460: .Op Ic on | Ic off
1461: .Xc
1462: If on, display a status line message when activity occurs in a window
1.39 jmc 1463: for which the
1.37 nicm 1464: .Ic monitor-activity
1465: window option is enabled.
1466: .It Xo Ic visual-bell
1467: .Op Ic on | Ic off
1468: .Xc
1469: If this option is on, a message is shown on a bell instead of it being passed
1470: through to the terminal (which normally makes a sound).
1471: Also see the
1472: .Ic bell-action
1473: option.
1474: .It Xo Ic visual-content
1475: .Op Ic on | Ic off
1476: .Xc
1477: Like
1478: .Ic visual-activity ,
1479: display a message when content is present in a window
1.39 jmc 1480: for which the
1.37 nicm 1481: .Ic monitor-content
1482: window option is enabled.
1.1 nicm 1483: .El
1484: .It Xo Ic set-password
1485: .Op Fl c
1486: .Ar password
1487: .Xc
1488: .D1 (alias: Ic pass )
1489: Set the server password.
1490: If the
1491: .Fl c
1492: option is given, a pre-encrypted password may be specified.
1493: By default, the password is blank, thus any entered password will be accepted
1494: when unlocking the server (see the
1495: .Ic lock-server
1496: command).
1497: To prevent variable expansion when an encrypted password is read from a
1498: configuration file, enclose it in single quotes (').
1499: .It Xo Ic set-window-option
1500: .Op Fl gu
1501: .Op Fl t Ar target-window
1502: .Ar option Ar value
1503: .Xc
1504: .D1 (alias: Ic setw )
1.18 nicm 1505: Set a window option.
1.1 nicm 1506: The
1507: .Fl g
1508: and
1509: .Fl u
1510: flags work similarly to the
1511: .Ic set-option
1512: command.
1513: .Pp
1.18 nicm 1514: Supported window options are:
1.1 nicm 1515: .Bl -tag -width Ds
1516: .It Xo Ic aggressive-resize
1517: .Op Ic on | Ic off
1518: .Xc
1519: Aggressively resize the chosen window.
1520: This means that
1521: .Nm
1522: will resize the window to the size of the smallest session for which it is the
1523: current window, rather than the smallest session to which it is attached.
1524: The window may resize when the current window is changed on another sessions;
1.6 jmc 1525: this option is good for full-screen programs which support
1526: .Dv SIGWINCH
1527: and poor for interactive programs such as shells.
1.1 nicm 1528: .It Xo Ic automatic-rename
1529: .Op Ic on | Ic off
1530: .Xc
1531: Control automatic window renaming.
1532: When this setting is enabled,
1533: .Nm
1534: will attempt - on supported platforms - to rename the window to reflect the
1535: command currently running in it.
1536: This flag is automatically disabled for an individual window when a name
1537: is specified at creation with
1538: .Ic new-window or
1539: .Ic new-session ,
1540: or later with
1541: .Ic rename-window .
1542: It may be switched off globally with:
1543: .Bd -literal -offset indent
1544: set-window-option -g automatic-rename off
1545: .Ed
1546: .It Ic clock-mode-colour Ar colour
1547: Set clock colour.
1548: .It Xo Ic clock-mode-style
1549: .Op Ic 12 | Ic 24
1550: .Xc
1551: Set clock hour format.
1552: .It Ic force-height Ar height
1553: .It Ic force-width Ar width
1554: Prevent
1555: .Nm
1556: from resizing a window to greater than
1557: .Ar width
1558: or
1559: .Ar height .
1560: A value of zero restores the default unlimited setting.
1.2 nicm 1561: .It Ic main-pane-width Ar width
1562: .It Ic main-pane-height Ar height
1563: Set the width or height of the main (left or top) pane in the
1564: .Ic main-horizontal
1565: or
1566: .Ic main-vertical
1567: layouts.
1.1 nicm 1568: .It Ic mode-attr Ar attributes
1569: Set window modes attributes.
1570: .It Ic mode-bg Ar colour
1571: Set window modes background colour.
1572: .It Ic mode-fg Ar colour
1573: Set window modes foreground colour.
1574: .It Xo Ic mode-keys
1575: .Op Ic vi | Ic emacs
1576: .Xc
1.50 nicm 1577: Use vi or emacs-style key bindings in scroll, copy and choice modes.
1.1 nicm 1578: Key bindings default to emacs.
1.50 nicm 1579: .It Xo Ic mode-mouse
1580: .Op Ic on | Ic off
1581: .Xc
1.51 jmc 1582: Mouse state in modes.
1583: If on,
1.50 nicm 1584: .Nm
1585: will respond to mouse clicks by moving the cursor in copy mode or selecting an
1586: option in choice mode.
1.1 nicm 1587: .It Xo Ic monitor-activity
1588: .Op Ic on | Ic off
1589: .Xc
1590: Monitor for activity in the window.
1591: Windows with activity are highlighted in the status line.
1592: .It Xo Ic monitor-content Ar match-string
1593: .Xc
1.6 jmc 1594: Monitor content in the window.
1595: When
1.16 nicm 1596: .Xr fnmatch 3
1597: pattern
1.1 nicm 1598: .Ar match-string
1599: appears in the window, it is highlighted in the status line.
1600: .It Xo Ic remain-on-exit
1601: .Op Ic on | Ic off
1602: .Xc
1603: A window with this flag set is not destroyed when the program running in it
1604: exits.
1605: The window may be reactivated with the
1606: .Ic respawn-window
1607: command.
1608: .It Xo Ic utf8
1609: .Op Ic on | Ic off
1610: .Xc
1611: Instructs
1612: .Nm
1613: to expect UTF-8 sequences to appear in this window.
1614: .It Ic window-status-attr Ar attributes
1615: Set status line attributes for a single window.
1616: .It Ic window-status-bg Ar colour
1617: Set status line background colour for a single window.
1618: .It Ic window-status-fg Ar colour
1619: Set status line foreground colour for a single window.
1.40 nicm 1620: .It Ic window-status-current-attr Ar attributes
1621: Set status line attributes for the currently active window.
1622: .It Ic window-status-current-bg Ar colour
1623: Set status line background colour for the currently active window.
1624: .It Ic window-status-current-fg Ar colour
1625: Set status line foreground colour for the currently active window.
1.1 nicm 1626: .It Xo Ic xterm-keys
1627: .Op Ic on | Ic off
1628: .Xc
1629: If this option is set,
1630: .Nm
1631: will generate
1632: .Xr xterm 1 -style
1633: function key sequences; these have a number included to indicate modifiers such
1.6 jmc 1634: as Shift, Alt or Ctrl.
1.1 nicm 1635: .El
1636: .It Xo Ic show-buffer
1637: .Op Fl b Ar buffer-index
1638: .Op Fl t Ar target-session
1639: .Xc
1640: .D1 (alias: Ic showb )
1641: Display the contents of the specified buffer.
1642: .It Xo Ic show-options
1.18 nicm 1643: .Op Fl g
1.1 nicm 1644: .Op Fl t Ar target-session
1645: .Xc
1646: .D1 (alias: Ic show )
1.18 nicm 1647: Show the session options for
1648: .Ar target session ,
1649: or the global session options with
1650: .Fl g .
1.1 nicm 1651: .It Xo Ic show-window-options
1.18 nicm 1652: .Op Fl g
1.1 nicm 1653: .Op Fl t Ar target-window
1654: .Xc
1655: .D1 (alias: Ic showw )
1.18 nicm 1656: List the window options for
1657: .Ar target-window ,
1658: or the global window options if
1659: .Fl g
1660: is used.
1.1 nicm 1661: .It Xo Ic source-file
1662: .Ar path
1663: .Xc
1664: .D1 (alias: Ic source )
1665: Execute commands from
1666: .Ar path .
1667: .It Xo Ic split-window
1.38 nicm 1668: .Op Fl dhv
1.1 nicm 1669: .Oo Fl l
1.38 nicm 1670: .Ar size |
1.1 nicm 1671: .Fl p Ar percentage Oc
1672: .Op Fl t Ar target-window
1673: .Op Ar command
1674: .Xc
1675: .D1 (alias: splitw )
1.38 nicm 1676: Creates a new pane by splitting the active pane:
1677: .Fl h
1678: does a horizontal split and
1679: .Fl v
1680: a vertical split; if neither is specified,
1681: .Fl v
1682: is assumed.
1.1 nicm 1683: The
1684: .Fl l
1685: and
1686: .Fl p
1.38 nicm 1687: options specify the size of the new window in lines (for vertical split) or in
1688: cells (for horizontal split), or as a percentage, respectively.
1.1 nicm 1689: All other options have the same meaning as in the
1690: .Ic new-window
1691: command.
1692: .It Xo Ic start-server
1693: .Xc
1694: .D1 (alias: Ic start )
1695: Start the
1696: .Nm
1697: server, if not already running, without creating any sessions.
1698: .It Xo Ic suspend-client
1699: .Op Fl c target-client
1700: .Xc
1701: .D1 (alias: Ic suspendc )
1.6 jmc 1702: Suspend a client by sending
1703: .Dv SIGTSTP
1704: (tty stop).
1.1 nicm 1705: .It Xo Ic swap-pane
1706: .Op Fl dDU
1.52 nicm 1707: .Op Fl s Ar src-pane
1708: .Op Fl t Ar dst-pane
1.1 nicm 1709: .Xc
1710: .D1 (alias: Ic swapp )
1.52 nicm 1711: Swap two panes.
1.1 nicm 1712: If
1713: .Fl U
1.52 nicm 1714: is used and no source pane is specified with
1715: .Fl s ,
1.53 jmc 1716: .Ar dst-pane
1717: is swapped with the previous pane (before it numerically);
1.1 nicm 1718: .Fl D
1.52 nicm 1719: swaps with the next pane (after it numerically).
1.1 nicm 1720: .It Xo Ic swap-window
1721: .Op Fl d
1722: .Op Fl s Ar src-window
1723: .Op Fl t Ar dst-window
1724: .Xc
1725: .D1 (alias: Ic swapw )
1726: This is similar to
1727: .Ic link-window ,
1728: except the source and destination windows are swapped.
1729: It is an error if no window exists at
1730: .Ar src-window .
1731: .It Xo Ic switch-client
1.32 nicm 1732: .Op Fl c Ar target-client
1733: .Op Fl t Ar target-session
1.1 nicm 1734: .Xc
1735: .D1 (alias: Ic switchc )
1736: Switch the current session for client
1737: .Ar target-client
1738: to
1739: .Ar target-session .
1740: .It Xo Ic unbind-key
1.49 nicm 1741: .Op Fl cn
1742: .Op Fl t Ar key-table
1.1 nicm 1743: .Ar key
1744: .Xc
1745: .D1 (alias: Ic unbind )
1.42 nicm 1746: Unbind the command bound to
1.1 nicm 1747: .Ar key .
1.49 nicm 1748: Without
1749: .Fl t
1750: the primary key bindings are modified; in this case, if
1.45 nicm 1751: .Fl n
1752: is specified, the command bound to
1753: .Ar key
1754: without a prefix (if any) is removed.
1.49 nicm 1755: .Pp
1756: If
1757: .Fl t
1758: is present,
1759: .Ar key
1760: in
1761: .Ar key-table
1762: is unbound: the binding for command mode with
1763: .Fl c
1764: or for normal mode without.
1.1 nicm 1765: .It Xo Ic unlink-window
1.31 nicm 1766: .Op Fl k
1.1 nicm 1767: .Op Fl t Ar target-window
1768: .Xc
1769: .D1 (alias: Ic unlinkw )
1770: Unlink
1771: .Ar target-window .
1.31 nicm 1772: Unless
1773: .Fl k
1774: is given, a window may be unlinked only if it is linked to multiple sessions -
1775: windows may not be linked to no sessions;
1776: if
1777: .Fl k
1778: is specified and the window is linked to only one session, it is unlinked and
1779: destroyed.
1.1 nicm 1780: .It Xo Ic up-pane
1.52 nicm 1781: .Op Fl t Ar target-pane
1.1 nicm 1782: .Xc
1783: .D1 (alias: Ic upp )
1784: Move up a pane.
1785: .El
1786: .Sh FILES
1.26 nicm 1787: .Bl -tag -width "/etc/tmux.confXXX" -compact
1.1 nicm 1788: .It Pa ~/.tmux.conf
1.6 jmc 1789: Default
1.1 nicm 1790: .Nm
1.6 jmc 1791: configuration file.
1.26 nicm 1792: .It Pa /etc/tmux.conf
1793: System-wide configuration file.
1.1 nicm 1794: .El
1795: .Sh SEE ALSO
1796: .Xr pty 4
1797: .Sh AUTHORS
1798: .An Nicholas Marriott Aq nicm@users.sourceforge.net