Annotation of src/usr.bin/tmux/tmux.1, Revision 1.46
1.46 ! nicm 1: .\" $OpenBSD: tmux.1,v 1.45 2009/07/24 14:52:47 nicm 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.45 nicm 17: .Dd $Mdocdate: July 24 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.46 ! nicm 334: .It Li "Delete to end of line" Ta "D or C" Ta "C-k"
1.2 nicm 335: .It Li "Paste buffer" Ta "p" Ta "C-y"
1.1 nicm 336: .El
337: .Pp
1.2 nicm 338: The paste buffer key pastes the first line from the top paste buffer on the
339: stack.
1.1 nicm 340: .Sh BUFFERS
341: .Nm
342: maintains a stack of
343: .Em paste buffers
344: for each session.
345: Up to the value of the
346: .Ic buffer-limit
347: option are kept; when a new buffer is added, the buffer at the bottom of the
348: stack is removed.
349: Buffers may be added using
350: .Ic copy-mode
351: or the
352: .Ic set-buffer
353: command, and pasted into a window using the
354: .Ic paste-buffer
355: command.
1.18 nicm 356: .Sh OPTIONS
357: The appearance and behaviour of
358: .Nm
359: may be modified by changing the value of various options.
360: There are two types of option:
361: .Em session options
362: and
363: .Em window options .
364: .Pp
365: Each individual session may have a set of session options, and there is a
366: separate set of global session options.
367: Sessions which do not have a particular option configured inherit the value
368: from the global session options.
369: Session options are set or unset with the
370: .Ic set-option
371: command and may be listed with the
372: .Ic show-options
373: command.
374: The available session options are listed under the
375: .Ic set-option
376: command.
377: .Pp
378: Similarly, a set of window options is attached to each window, and there is
379: a set of global window options from which any unset options are inherited.
380: Window options are altered with the
381: .Ic set-window-option
382: command and can be listed with the
383: .Ic show-window-options
384: command.
385: All window options are documented with the
386: .Ic set-window-option
387: command.
1.1 nicm 388: .Sh PANES AND LAYOUTS
389: Each window displayed by
390: .Nm
391: may be split into one or more
392: .Em panes ;
393: each pane takes up a certain area of the display and is a separate terminal.
394: A window may be split into panes using the
395: .Ic split-window
396: command.
1.38 nicm 397: Windows may be split horizontally (with the
398: .Fl h
399: flag) or vertically.
400: Panes may be resized with the
401: .Ic resize-pane
1.1 nicm 402: command (bound to
1.38 nicm 403: .Ql C-up ,
404: .Ql C-down
405: .Ql C-left
406: and
407: .Ql C-right
1.1 nicm 408: by default), the current pane may be changed with the
409: .Ic up-pane
410: and
411: .Ic down-pane
412: commands and the
413: .Ic rotate-window
414: and
415: .Ic swap-pane
1.38 nicm 416: commands may be used to swap panes without changing their position.
417: Panes are numbered beginning from zero in the order they are created.
418: .Pp
419: A number of preset
420: .Em layouts
421: are available.
422: These may be selected with the
423: .Ic select-layout
424: command or cycled with
425: .Ic next-layout
426: (bound to
427: .Ql C-space
428: by default); once a layout is chosen, panes within it may be moved and resized as normal.
1.1 nicm 429: .Pp
430: The following layouts are supported:
431: .Bl -tag -width Ds
432: .It Ic even-horizontal
433: Panes are spread out evenly from left to right across the window.
434: .It Ic even-vertical
435: Panes are spread evenly from top to bottom.
1.2 nicm 436: .It Ic main-horizontal
437: A large (main) pane is shown at the top of the window and the remaining panes are
1.6 jmc 438: spread from left to right in the leftover space at the bottom.
1.2 nicm 439: Use the
440: .Em main-pane-height
441: window option to specify the height of the top pane.
1.1 nicm 442: .It Ic main-vertical
1.2 nicm 443: Similar to
444: .Ic main-horizontal
445: but the large pane is placed on the left and the others spread from top to
446: bottom along the right.
447: See the
448: .Em main-pane-width
449: window option.
1.1 nicm 450: .El
1.8 nicm 451: .Sh STATUS LINE
452: .Nm
453: includes an optional status line which is displayed in the bottom line of each
454: terminal.
455: By default, the status line is enabled (it may be disabled with the
456: .Ic status
457: session option) and contains, from left-to-right: the name of the current
458: session in square brackets; the window list; the current window title in double
459: quotes; and the time and date.
460: .Pp
461: The status line is made of three parts: configurable left and right sections
462: (which may contain dynamic content such as the time or output from a shell
463: command, see the
464: .Ic status-left ,
465: .Ic status-left-length ,
466: .Ic status-right ,
467: and
468: .Ic status-right-length
469: options below), and a central window list.
470: The window list shows the index, name and (if any) flag of the windows
471: present in the current session in ascending numerical order.
472: The flag is one of the following symbols appended to the window name:
473: .Bl -column "Symbol" "Meaning" -offset indent
474: .It Sy "Symbol" Ta Sy "Meaning"
475: .It Li "*" Ta "Denotes the current window."
476: .It Li "-" Ta "Marks the last window (previously selected)."
477: .It Li "#" Ta "Window is monitored and activity has been detected."
478: .It Li "!" Ta "A bell has occurred in the window."
479: .It Li "+" Ta "Window is monitored for content and it has appeared."
480: .El
481: .Pp
482: The # symbol relates to the
483: .Ic monitor-activity
484: and + to the
485: .Ic monitor-content
486: window options.
487: The window name is printed in inverted colours if an alert (bell, activity or
488: content) is present.
489: .Pp
490: The colour and attributes of the status line may be configured, the entire status line using
491: the
492: .Ic status-attr ,
493: .Ic status-fg
494: and
495: .Ic status-bg
496: session options and individual windows using the
497: .Ic window-status-attr ,
498: .Ic window-status-fg
499: and
500: .Ic window-status-bg
501: window options.
502: .Pp
503: The status line is automatically refreshed at interval if it has changed, the interval may be
504: controlled with the
505: .Ic status-interval
506: session option.
1.1 nicm 507: .Sh COMMANDS
508: This section contains a list of the commands supported by
509: .Nm .
510: Most commands accept the optional
511: .Fl t
512: argument with one of
513: .Ar target-client ,
514: .Ar target-session
515: or
516: .Ar target-window .
517: These specify the client, session or window which a command should affect.
518: .Ar target-client
519: is the name of the
520: .Xr pty 4
1.29 nicm 521: file to which the client is connected, for example either of
522: .Pa /dev/ttyp1
523: or
524: .Pa ttyp1
1.30 jmc 525: for the client attached to
1.1 nicm 526: .Pa /dev/ttyp1 .
1.29 nicm 527: If no client is specified, the current client is chosen, if possible, or an
528: error is reported.
1.1 nicm 529: Clients may be listed with the
530: .Ic list-clients
531: command.
532: .Pp
533: .Ar target-session
534: is either the name of a session (as listed by the
535: .Ic list-sessions
1.29 nicm 536: command) or the name of a client with the same syntax as
1.1 nicm 537: .Ar target-client ,
1.6 jmc 538: in which case the session attached to the client is used.
1.30 jmc 539: When looking for the session name,
1.29 nicm 540: .Nm
541: initially searches for an exact match; if none is found, the session names
542: are checked for any for which
543: .Ar target-session
544: is a prefix or for which it matches as an
1.1 nicm 545: .Xr fnmatch 3
1.29 nicm 546: pattern.
547: If a single match is found, it is used as the target session; multiple matches
1.43 nicm 548: produce an error.
1.29 nicm 549: If a session is omitted, the current session is used if available; if no
550: current session is available, the most recently created is chosen.
1.1 nicm 551: .Pp
552: .Ar target-window
553: specifies a window in the form
1.43 nicm 554: .Em session Ns \&: Ns Em window .
555: .Em session
556: follows the same rules as for
557: .Ar target-session ,
558: and
1.29 nicm 559: .Em window
1.43 nicm 560: is looked for in order: as a window index, for example mysession:1; as an exact
561: window name, such as mysession:mywindow; then as an
1.29 nicm 562: .Xr fnmatch 3
1.43 nicm 563: pattern or the start of a window name, such as mysession:mywin* or
564: mysession:mywin.
565: An empty window name specifies the next unused index if appropriate (for
566: example the
567: .Ic new-window
568: and
569: .Ic link-window
570: commands)
571: otherwise the current window in
1.1 nicm 572: .Em session
1.43 nicm 573: is chosen.
1.6 jmc 574: When the argument does not contain a colon,
1.1 nicm 575: .Nm
1.43 nicm 576: first attempts to parse it as window; if that fails, an attempt is made to
577: match a session.
1.1 nicm 578: .Pp
579: Multiple commands may be specified together as part of a
580: .Em command sequence .
1.6 jmc 581: Each command should be separated by spaces and a semicolon;
1.1 nicm 582: commands are executed sequentially from left to right.
583: A literal semicolon may be included by escaping it with a backslash (for
584: example, when specifying a command sequence to
585: .Ic bind-key ) .
586: .Pp
587: Examples include:
588: .Bd -literal -offset indent
589: refresh-client -t/dev/ttyp2
590:
591: rename-session -tfirst newname
592:
593: set-window-option -t:0 monitor-activity on
594:
595: new-window ; split-window -d
596:
597: bind-key D detach-client \e\; lock-server
598: .Ed
599: .Pp
600: The following commands are available:
601: .Bl -tag -width Ds
602: .It Xo Ic attach-session
603: .Op Fl d
604: .Op Fl t Ar target-session
605: .Xc
606: .D1 (alias: Ic attach )
1.34 nicm 607: If run from outside
608: .Nm ,
609: create a new client in the current terminal and attach it to
610: .Ar target-session .
611: If used from inside, switch the current client.
1.1 nicm 612: If
613: .Fl d
614: is specified, any other clients attached to the session are detached.
615: .Pp
616: If no server is started,
617: .Ic attach-session
618: will attempt to start it; this will fail unless sessions are created in the
619: configuration file.
620: .It Xo Ic bind-key
1.45 nicm 621: .Op Fl nr
1.1 nicm 622: .Ar key Ar command Op Ar arguments
623: .Xc
624: .D1 (alias: Ic bind )
625: Bind key
626: .Ar key
627: to
628: .Ar command .
629: Keys may be specified prefixed with
630: .Ql C-
631: or
632: .Ql ^
1.6 jmc 633: for Ctrl keys, or
1.1 nicm 634: .Ql M-
1.6 jmc 635: for Alt (meta) keys.
1.45 nicm 636: If
637: .Fl n
638: is specified, it is not necessary to use the prefix key,
639: .Ar command
640: is bound to
641: .Ar key
642: alone.
1.1 nicm 643: The
644: .Fl r
645: flag indicates this key may repeat, see the
646: .Ic repeat-time
647: option.
648: .It Xo Ic break-pane
649: .Op Fl d
650: .Op Fl p Ar pane-index
651: .Op Fl t Ar target-window
652: .Xc
1.17 nicm 653: .D1 (alias: Ic breakp )
1.1 nicm 654: Break the current pane off from its containing window to make it the only pane
655: in a new window.
656: If
657: .Fl d
658: is given, the new window does not become the current window.
659: .It Xo Ic choose-session
660: .Op Fl t Ar target-window
661: .Xc
662: Put a window into session choice mode, where the session for the current
663: client may be selected interactively from a list.
664: This command works only from inside
665: .Nm .
666: .It Xo Ic choose-window
667: .Op Fl t Ar target-window
668: .Xc
669: Put a window into window choice mode, where the window for the session
670: attached to the current client may be selected interactively from a list.
671: This command works only from inside
672: .Nm .
1.2 nicm 673: .It Xo Ic clear-history
674: .Op Fl p Ar pane-index
675: .Op Fl t Ar target-window
676: .Xc
1.17 nicm 677: .D1 (alias: Ic clearhist )
1.2 nicm 678: Remove and free the history for the specified pane.
1.1 nicm 679: .It Xo Ic clock-mode
680: .Op Fl t Ar target-window
681: .Xc
682: Display a large clock.
683: .It Xo Ic command-prompt
684: .Op Fl t Ar target-client
685: .Op Ar template
686: .Xc
687: Open the command prompt in a client.
688: This may be used from inside
689: .Nm
690: to execute commands interactively.
691: If
692: .Ar template
693: is specified, it is used as the command; any %% in the template will be
694: replaced by what is entered at the prompt.
695: .It Xo Ic confirm-before
696: .Op Fl t Ar target-client
697: .Ar command
698: .Xc
1.17 nicm 699: .D1 (alias: Ic confirm )
1.1 nicm 700: Ask for confirmation before executing
701: .Ar command .
702: This command works only from inside
703: .Nm .
704: .It Xo Ic copy-buffer
705: .Op Fl a Ar src-index
706: .Op Fl b Ar dst-index
707: .Op Fl s Ar src-session
708: .Op Fl t Ar dst-session
709: .Xc
1.17 nicm 710: .D1 (alias: Ic copyb )
1.1 nicm 711: Copy a session paste buffer to another session.
712: If no sessions are specified, the current one is used instead.
713: .It Xo Ic copy-mode
714: .Op Fl u
715: .Op Fl t Ar target-window
716: .Xc
717: Enter copy mode.
718: The
719: .Fl u
720: option scrolls one page up.
721: .It Xo Ic delete-buffer
722: .Op Fl b Ar buffer-index
723: .Op Fl t Ar target-session
724: .Xc
725: .D1 (alias: Ic deleteb )
726: Delete the buffer at
727: .Ar buffer-index ,
728: or the top buffer if not specified.
729: .It Xo Ic detach-client
730: .Op Fl t Ar target-client
731: .Xc
732: .D1 (alias: Ic detach )
733: Detach the current client if bound to a key, or the specified client with
734: .Fl t .
1.35 nicm 735: .It Xo Ic display-message
736: .Op Fl t Ar target-client
737: .Op Ar message
738: .Xc
739: .D1 (alias: Ic display )
740: Display a message (see the
741: .Ic status-left
742: option below)
743: in the status line.
1.1 nicm 744: .It Xo Ic down-pane
745: .Op Fl p Ar pane-index
746: .Op Fl t Ar target-window
747: .Xc
748: .D1 (alias: Ic downp )
749: Move down a pane.
750: .It Xo Ic find-window
751: .Op Fl t Ar target-window
752: .Ar match-string
753: .Xc
754: .D1 (alias: Ic findw )
1.16 nicm 755: Search for the
756: .Xr fnmatch 3
757: pattern
1.1 nicm 758: .Ar match-string
759: in window names, titles, and visible content (but not history).
760: If only one window is matched, it'll be automatically selected, otherwise a
761: choice list is shown.
762: This command only works from inside
763: .Nm .
764: .It Xo Ic has-session
765: .Op Fl t Ar target-session
766: .Xc
767: .D1 (alias: Ic has )
768: Report an error and exit with 1 if the specified session does not exist.
769: If it does exist, exit with 0.
1.20 nicm 770: .It Xo Ic if-shell
771: .Ar shell-command
772: .Ar command
773: .Xc
774: .D1 (alias: Ic if )
775: Execute
776: .Ar command
777: if
778: .Ar shell-command
779: returns success.
1.1 nicm 780: .It Xo Ic kill-pane
781: .Op Fl p Ar pane-index
782: .Op Fl t Ar target-window
783: .Xc
784: .D1 (alias: Ic killp )
785: Destroy the given pane.
1.36 nicm 786: If no panes remain in the containing window, it is also destroyed.
1.1 nicm 787: .It Xo Ic kill-server
788: .Xc
789: Kill the
790: .Nm
791: server and clients and destroy all sessions.
792: .It Xo Ic kill-session
793: .Op Fl t Ar target-session
794: .Xc
795: Destroy the given session, closing any windows linked to it and no other
796: sessions, and detaching all clients attached to it.
797: .It Xo Ic kill-window
798: .Op Fl t Ar target-window
799: .Xc
800: .D1 (alias: Ic killw )
801: Kill the current window or the window at
802: .Ar target-window ,
803: removing it from any sessions to which it is linked.
804: .It Xo Ic last-window
805: .Op Fl t Ar target-session
806: .Xc
807: .D1 (alias: Ic last )
808: Select the last (previously selected) window.
809: If no
810: .Ar target-session
811: is specified, select the last window of the current session.
812: .It Xo Ic link-window
813: .Op Fl dk
814: .Op Fl s Ar src-window
815: .Op Fl t Ar dst-window
816: .Xc
817: .D1 (alias: Ic linkw )
818: Link the window at
819: .Ar src-window
820: to the specified
821: .Ar dst-window .
822: If
823: .Ar dst-window
824: is specified and no such window exists, the
825: .Ar src-window
826: is linked there.
827: If
828: .Fl k
829: is given and
830: .Ar dst-window
831: exists, it is killed, otherwise an error is generated.
832: If
833: .Fl d
834: is given, the newly linked window is not selected.
835: .It Xo Ic list-buffers
836: .Op Fl t Ar target-session
837: .Xc
838: .D1 (alias: Ic lsb )
839: List the buffers in the given session.
840: .It Xo Ic list-clients
841: .Xc
842: .D1 (alias: Ic lsc )
843: List all clients attached to the server.
844: .It Xo Ic list-commands
845: .Xc
846: .D1 (alias: Ic lscm )
847: List the syntax of all commands supported by
848: .Nm .
849: .It Xo Ic list-keys
850: .Xc
851: .D1 (alias: Ic lsk )
852: List all key bindings.
1.45 nicm 853: Keys bound without the prefix key (see
854: .Ic bind-key
855: .Fl n )
856: are enclosed in square brackets.
1.1 nicm 857: .It Xo Ic list-sessions
858: .Xc
859: .D1 (alias: Ic ls )
860: List all sessions managed by the server.
861: .It Xo Ic list-windows
862: .Op Fl t Ar target-session
863: .Xc
864: .D1 (alias: Ic lsw )
865: List windows in the current session or in
866: .Ar target-session .
867: .It Xo Ic load-buffer
868: .Op Fl b Ar buffer-index
869: .Op Fl t Ar target-session
870: .Ar path
871: .Xc
872: .D1 (alias: Ic loadb )
873: Load the contents of the specified paste buffer from
874: .Ar path .
875: .It Xo Ic lock-server
876: .Xc
877: .D1 (alias: Ic lock )
878: Lock the server until a password is entered.
879: .It Xo Ic move-window
880: .Op Fl d
881: .Op Fl s Ar src-window
882: .Op Fl t Ar dst-window
883: .Xc
884: .D1 (alias: Ic movew )
885: This is similar to
886: .Ic link-window ,
887: except the window at
888: .Ar src-window
889: is moved to
890: .Ar dst-window .
891: .It Xo Ic new-session
892: .Op Fl d
893: .Op Fl n Ar window-name
894: .Op Fl s Ar session-name
895: .Op Ar command
896: .Xc
897: .D1 (alias: Ic new )
898: Create a new session with name
899: .Ar session-name .
900: The new session is attached to the current terminal unless
901: .Fl d
902: is given.
903: .Ar window-name
904: and
905: .Ar command
906: are the name of and command to execute in the initial window.
907: .It Xo Ic new-window
1.28 nicm 908: .Op Fl dk
1.1 nicm 909: .Op Fl n Ar window-name
910: .Op Fl t Ar target-window
911: .Op Ar command
912: .Xc
913: .D1 (alias: Ic neww )
914: Create a new window.
915: If
916: .Fl d
917: is given, the session does not make the new window the current window.
918: .Ar target-window
1.28 nicm 919: represents the window to be created; if the target already exists an error is
920: shown, unless the
921: .Fl k
922: flag is used, in which case it is destroyed.
1.1 nicm 923: .Ar command
924: is the command to execute.
925: If
926: .Ar command
927: is not specified, the default command is used.
928: .Pp
929: The
930: .Ev TERM
931: environment variable must be set to
932: .Dq screen
933: for all programs running
934: .Em inside
935: .Nm .
936: New windows will automatically have
937: .Dq TERM=screen
938: added to their environment, but care must be taken not to reset this in shell
939: start-up files.
940: .It Xo Ic next-layout
941: .Op Fl t Ar target-window
942: .Xc
943: .D1 (alias: Ic nextl )
944: Move a window to the next layout and rearrange the panes to fit.
945: .It Xo Ic next-window
1.9 nicm 946: .Op Fl a
1.1 nicm 947: .Op Fl t Ar target-session
948: .Xc
949: .D1 (alias: Ic next )
950: Move to the next window in the session.
1.9 nicm 951: If
1.12 jmc 952: .Fl a
1.9 nicm 953: is used, move to the next window with a bell, activity or content alert.
1.1 nicm 954: .It Xo Ic paste-buffer
1.25 nicm 955: .Op Fl dr
1.1 nicm 956: .Op Fl b Ar buffer-index
957: .Op Fl t Ar target-window
958: .Xc
959: .D1 (alias: Ic pasteb )
960: Insert the contents of a paste buffer into the current window.
1.23 nicm 961: With
962: .Fl d ,
963: also delete the paste buffer from the stack.
1.24 nicm 964: When output, any linefeed (LF) characters in the paste buffer are replaced with
965: carriage returns (CR).
966: This translation may be disabled with the
967: .Fl r
968: flag.
1.1 nicm 969: .It Xo Ic previous-window
1.9 nicm 970: .Op Fl a
1.1 nicm 971: .Op Fl t Ar target-session
972: .Xc
973: .D1 (alias: Ic prev )
974: Move to the previous window in the session.
1.9 nicm 975: With
976: .Fl a ,
977: move to the previous window with a bell, activity or content alert.
1.1 nicm 978: .It Xo Ic refresh-client
979: .Op Fl t Ar target-client
980: .Xc
981: .D1 (alias: Ic refresh )
982: Refresh the current client if bound to a key, or a single client if one is given
983: with
984: .Fl t .
985: .It Xo Ic rename-session
986: .Op Fl t Ar target-session
987: .Ar new-name
988: .Xc
989: .D1 (alias: Ic rename )
990: Rename the session to
991: .Ar new-name .
992: .It Xo Ic rename-window
993: .Op Fl t Ar target-window
994: .Ar new-name
995: .Xc
996: .D1 (alias: Ic renamew )
997: Rename the current window, or the window at
998: .Ar target-window
999: if specified, to
1000: .Ar new-name .
1001: .It Xo Ic resize-pane
1.39 jmc 1002: .Op Fl DLRU
1.1 nicm 1003: .Op Fl p Ar pane-index
1004: .Op Fl t Ar target-window
1005: .Op Ar adjustment
1006: .Xc
1007: .D1 (alias: Ic resizep )
1008: Resize a pane, upward with
1009: .Fl U
1.38 nicm 1010: (the default), downward with
1011: .Fl D ,
1012: to the left with
1013: .Fl L
1014: and to the right with
1.39 jmc 1015: .Fl R .
1.1 nicm 1016: The
1017: .Ar adjustment
1.38 nicm 1018: is given in lines or cells (the default is 1).
1.1 nicm 1019: .It Xo Ic respawn-window
1020: .Op Fl k
1021: .Op Fl t Ar target-window
1022: .Op Ar command
1023: .Xc
1024: .D1 (alias: Ic respawnw )
1025: Reactive a window in which the command has exited (see the
1026: .Ic remain-on-exit
1027: window option).
1028: If
1029: .Ar command
1030: is not given, the command used when the window was created is executed.
1031: The window must be already inactive, unless
1032: .Fl k
1033: is given, in which case any existing command is killed.
1034: .It Xo Ic rotate-window
1035: .Op Fl DU
1036: .Op Fl t Ar target-window
1037: .Xc
1038: .D1 (alias: Ic rotatew )
1039: Rotate the positions of the panes within a window, either upward (numerically
1040: lower) with
1041: .Fl U
1042: or downward (numerically higher).
1043: .It Xo Ic save-buffer
1044: .Op Fl a
1045: .Op Fl b Ar buffer-index
1046: .Op Fl t Ar target-session
1047: .Ar path
1048: .Xc
1049: .D1 (alias: Ic saveb )
1050: Save the contents of the specified paste buffer to
1051: .Ar path .
1052: The
1053: .Fl a
1054: option appends to rather than overwriting the file.
1055: .It Xo Ic scroll-mode
1056: .Op Fl u
1057: .Op Fl t Ar target-window
1058: .Xc
1059: Enter scroll mode.
1060: The
1061: .Fl u
1062: has the same meaning as in the
1063: .Ic copy-mode
1064: command.
1.2 nicm 1065: .It Xo Ic select-layout
1066: .Op Fl t Ar target-window
1067: .Ar layout-name
1068: .Xc
1.17 nicm 1069: .D1 (alias: selectl )
1.2 nicm 1070: Choose a specific layout for a window.
1.1 nicm 1071: .It Xo Ic select-pane
1072: .Op Fl p Ar pane-index
1073: .Op Fl t Ar target-window
1074: .Xc
1075: .D1 (alias: Ic selectp )
1076: Make pane
1077: .Ar pane-index
1078: the active pane in window
1079: .Ar target-window .
1080: .It Xo Ic select-prompt
1081: .Op Fl t Ar target-client
1082: .Xc
1083: Open a prompt inside
1084: .Ar target-client
1085: allowing a window index to be entered interactively.
1086: .It Xo Ic select-window
1087: .Op Fl t Ar target-window
1088: .Xc
1089: .D1 (alias: Ic selectw )
1090: Select the window at
1091: .Ar target-window .
1092: .It Xo Ic send-keys
1093: .Op Fl t Ar target-window
1094: .Ar key Ar ...
1095: .Xc
1096: .D1 (alias: Ic send )
1097: Send a key or keys to a window.
1098: Each argument
1099: .Ar key
1100: is the name of the key (such as
1101: .Ql C-a
1102: or
1103: .Ql npage
1104: ) to send; if the string is not recognised as a key, it is sent as a series of
1105: characters.
1106: All arguments are sent sequentially from first to last.
1107: .It Xo Ic send-prefix
1108: .Op Fl t Ar target-window
1109: .Xc
1110: Send the prefix key to a window as if it was pressed.
1111: .It Xo Ic server-info
1112: .Xc
1113: .D1 (alias: Ic info )
1114: Show server information and terminal details.
1115: .It Xo Ic set-buffer
1116: .Op Fl b Ar buffer-index
1117: .Op Fl t Ar target-session
1118: .Ar data
1119: .Xc
1120: .D1 (alias: Ic setb )
1121: Set the contents of the specified buffer to
1122: .Ar data .
1123: .It Xo Ic set-option
1124: .Op Fl gu
1125: .Op Fl t Ar target-session
1126: .Ar option Ar value
1127: .Xc
1128: .D1 (alias: Ic set )
1.18 nicm 1129: Set a session option.
1.1 nicm 1130: If
1131: .Fl g
1.18 nicm 1132: is specified, the global session option is set.
1.1 nicm 1133: The
1134: .Fl u
1135: flag unsets an option, so a session inherits the option from the global
1136: options - it is not possible to unset a global option.
1137: .Pp
1.18 nicm 1138: Available session options are:
1.1 nicm 1139: .Bl -tag -width Ds
1140: .It Xo Ic bell-action
1141: .Op Ic any | Ic none | Ic current
1142: .Xc
1143: Set action on window bell.
1144: .Ic any
1145: means a bell in any window linked to a session causes a bell in the current
1146: window of that session,
1147: .Ic none
1148: means all bells are ignored and
1149: .Ic current
1150: means only bell in windows other than the current window are ignored.
1151: .It Ic buffer-limit Ar number
1152: Set the number of buffers kept for each session; as new buffers are added to
1153: the top of the stack, old ones are removed from the bottom if necessary to
1154: maintain this maximum length.
1155: .It Ic default-command Ar command
1156: Set the command used for new windows (if not specified when the window is
1157: created) to
1158: .Ar command .
1.19 nicm 1159: The default is an empty string, which instructs
1160: .Nm
1161: to create a login shell using the
1162: .Ev SHELL
1163: environment variable or, if it is unset, the user's shell returned by
1164: .Xr getpwuid 3 .
1.1 nicm 1165: .It Ic default-path Ar path
1166: Set the default working directory for processes created from keys, or
1167: interactively from the prompt.
1168: The default is the current working directory when the server is started.
1.22 nicm 1169: .It Ic default-terminal Ar terminal
1170: Set the default terminal for new windows created in this session - the
1171: default value of the
1172: .Ev TERM
1173: environment variable.
1174: For
1175: .Nm
1176: to work correctly, this
1177: .Em must
1178: be set to
1179: .Ql screen
1180: or a derivative of it.
1.21 nicm 1181: .It Ic display-time Ar time
1182: Set the amount of time for which status line messages are displayed.
1183: .Ar time
1184: is in milliseconds.
1.1 nicm 1185: .It Ic history-limit Ar lines
1186: Set the maximum number of lines held in window history.
1187: This setting applies only to new windows - existing window histories are not
1188: resized and retain the limit at the point they were created.
1189: .It Ic lock-after-time Ar number
1190: Lock the server after
1191: .Ar number
1192: seconds of inactivity.
1193: The default is off (set to 0).
1194: This has no effect as a session option; it must be set as a global option using
1195: .Fl g .
1196: .It Ic message-attr Ar attributes
1197: Set status line message attributes, where
1198: .Ar attributes
1199: is either
1200: .Ic default
1201: or a comma-delimited list of one or more of:
1202: .Ic bright
1203: (or
1204: .Ic bold ) ,
1205: .Ic dim ,
1206: .Ic underscore ,
1207: .Ic blink ,
1208: .Ic reverse ,
1209: .Ic hidden ,
1210: or
1211: .Ic italics .
1212: .It Ic message-bg Ar colour
1213: Set status line message background colour, where
1214: .Ar colour
1215: is one of:
1216: .Ic black ,
1217: .Ic red ,
1218: .Ic green ,
1219: .Ic yellow ,
1220: .Ic blue ,
1221: .Ic magenta ,
1222: .Ic cyan ,
1223: .Ic white
1224: or
1225: .Ic default .
1226: .It Ic message-fg Ar colour
1227: Set status line message foreground colour.
1228: .It Ic prefix Ar key
1229: Set the current prefix key.
1.21 nicm 1230: .It Ic repeat-time Ar time
1.1 nicm 1231: Allow multiple commands to be entered without pressing the prefix-key again
1232: in the specified
1.21 nicm 1233: .Ar time
1.1 nicm 1234: milliseconds (the default is 500).
1235: Whether a key repeats may be set when it is bound using the
1236: .Fl r
1237: flag to
1238: .Ic bind-key .
1239: Repeat is enabled for the default keys of the
1.44 sthen 1240: .Ic resize-pane-up
1.1 nicm 1241: and
1242: .Ic resize-pane-down
1243: commands.
1244: .It Xo Ic set-remain-on-exit
1245: .Op Ic on | Ic off
1246: .Xc
1247: Set the
1248: .Ic remain-on-exit
1249: window option for any windows first created in this session.
1250: .It Xo Ic set-titles
1251: .Op Ic on | Ic off
1252: .Xc
1253: Attempt to set the window title using the \ee]2;...\e007 xterm code and
1254: the terminal appears to be an xterm.
1.11 nicm 1255: This option is off by default.
1.6 jmc 1256: Note that elinks
1.1 nicm 1257: will only attempt to set the window title if the STY environment
1258: variable is set.
1259: .It Xo Ic status
1260: .Op Ic on | Ic off
1261: .Xc
1262: Show or hide the status line.
1263: .It Ic status-attr Ar attributes
1264: Set status line attributes.
1265: .It Ic status-bg Ar colour
1266: Set status line background colour.
1267: .It Ic status-fg Ar colour
1268: Set status line foreground colour.
1269: .It Ic status-interval Ar interval
1270: Update the status bar every
1271: .Ar interval
1272: seconds.
1273: By default, updates will occur every 15 seconds.
1274: A setting of zero disables redrawing at interval.
1.41 nicm 1275: .It Xo Ic status-justify
1276: .Op Ic left | Ic centre | Ic right
1277: .Xc
1278: Set the position of the window list component of the status line: left, centre
1279: or right justified.
1.1 nicm 1280: .It Xo Ic status-keys
1281: .Op Ic vi | Ic emacs
1282: .Xc
1.6 jmc 1283: Use vi or emacs-style
1.1 nicm 1284: key bindings in the status line, for example at the command prompt.
1285: Defaults to emacs.
1286: .It Ic status-left Ar string
1287: Display
1288: .Ar string
1289: to the left of the status bar.
1290: .Ar string
1291: will be passed through
1292: .Xr strftime 3
1293: before being used.
1294: By default, the session name is shown.
1295: .Ar string
1296: may contain any of the following special character pairs:
1297: .Bl -column "Character pair" "Replaced with" -offset indent
1298: .It Sy "Character pair" Ta Sy "Replaced with"
1299: .It Li "#(command)" Ta "First line of command's output"
1300: .It Li "#H" Ta "Hostname of local host"
1.35 nicm 1301: .It Li "#I" Ta "Current window index"
1302: .It Li "#P" Ta "Current pane index"
1.1 nicm 1303: .It Li "#S" Ta "Session name"
1304: .It Li "#T" Ta "Current window title"
1.35 nicm 1305: .It Li "#W" Ta "Current window name"
1.1 nicm 1306: .It Li "##" Ta "A literal" Ql #
1307: .El
1308: .Pp
1309: Where appropriate, these may be prefixed with a number to specify the maximum
1310: length, for example
1311: .Ql #24T .
1.10 nicm 1312: .Pp
1.12 jmc 1313: By default, UTF-8 in
1.10 nicm 1314: .Ar string
1315: is not interpreted, to enable UTF-8, use the
1316: .Ic status-utf8
1317: option.
1.1 nicm 1318: .It Ic status-left-length Ar length
1319: Set the maximum
1320: .Ar length
1321: of the left component of the status bar.
1322: The default is 10.
1323: .It Ic status-right Ar string
1324: Display
1325: .Ar string
1326: to the right of the status bar.
1327: By default, the date and time will be shown.
1328: As with
1329: .Ic status-left ,
1330: .Ar string
1331: will be passed to
1.10 nicm 1332: .Xr strftime 3 ,
1333: character pairs are replaced, and UTF-8 is dependent on the
1334: .Ic status-utf8
1335: option.
1.1 nicm 1336: .It Ic status-right-length Ar length
1337: Set the maximum
1338: .Ar length
1339: of the right component of the status bar.
1340: The default is 40.
1.10 nicm 1341: .Pp
1342: .It Xo Ic status-utf8
1343: .Op Ic on | Ic off
1344: .Xc
1345: Instruct
1346: .Nm
1347: to treat top-bit-set characters in the
1348: .Ic status-left
1349: and
1350: .Ic status-right
1351: strings as UTF-8; notably, this is important for wide characters.
1352: This option defaults to off.
1.37 nicm 1353: .It Xo Ic visual-activity
1354: .Op Ic on | Ic off
1355: .Xc
1356: If on, display a status line message when activity occurs in a window
1.39 jmc 1357: for which the
1.37 nicm 1358: .Ic monitor-activity
1359: window option is enabled.
1360: .It Xo Ic visual-bell
1361: .Op Ic on | Ic off
1362: .Xc
1363: If this option is on, a message is shown on a bell instead of it being passed
1364: through to the terminal (which normally makes a sound).
1365: Also see the
1366: .Ic bell-action
1367: option.
1368: .It Xo Ic visual-content
1369: .Op Ic on | Ic off
1370: .Xc
1371: Like
1372: .Ic visual-activity ,
1373: display a message when content is present in a window
1.39 jmc 1374: for which the
1.37 nicm 1375: .Ic monitor-content
1376: window option is enabled.
1.1 nicm 1377: .El
1378: .It Xo Ic set-password
1379: .Op Fl c
1380: .Ar password
1381: .Xc
1382: .D1 (alias: Ic pass )
1383: Set the server password.
1384: If the
1385: .Fl c
1386: option is given, a pre-encrypted password may be specified.
1387: By default, the password is blank, thus any entered password will be accepted
1388: when unlocking the server (see the
1389: .Ic lock-server
1390: command).
1391: To prevent variable expansion when an encrypted password is read from a
1392: configuration file, enclose it in single quotes (').
1393: .It Xo Ic set-window-option
1394: .Op Fl gu
1395: .Op Fl t Ar target-window
1396: .Ar option Ar value
1397: .Xc
1398: .D1 (alias: Ic setw )
1.18 nicm 1399: Set a window option.
1.1 nicm 1400: The
1401: .Fl g
1402: and
1403: .Fl u
1404: flags work similarly to the
1405: .Ic set-option
1406: command.
1407: .Pp
1.18 nicm 1408: Supported window options are:
1.1 nicm 1409: .Bl -tag -width Ds
1410: .It Xo Ic aggressive-resize
1411: .Op Ic on | Ic off
1412: .Xc
1413: Aggressively resize the chosen window.
1414: This means that
1415: .Nm
1416: will resize the window to the size of the smallest session for which it is the
1417: current window, rather than the smallest session to which it is attached.
1418: The window may resize when the current window is changed on another sessions;
1.6 jmc 1419: this option is good for full-screen programs which support
1420: .Dv SIGWINCH
1421: and poor for interactive programs such as shells.
1.1 nicm 1422: .It Xo Ic automatic-rename
1423: .Op Ic on | Ic off
1424: .Xc
1425: Control automatic window renaming.
1426: When this setting is enabled,
1427: .Nm
1428: will attempt - on supported platforms - to rename the window to reflect the
1429: command currently running in it.
1430: This flag is automatically disabled for an individual window when a name
1431: is specified at creation with
1432: .Ic new-window or
1433: .Ic new-session ,
1434: or later with
1435: .Ic rename-window .
1436: It may be switched off globally with:
1437: .Bd -literal -offset indent
1438: set-window-option -g automatic-rename off
1439: .Ed
1440: .It Ic clock-mode-colour Ar colour
1441: Set clock colour.
1442: .It Xo Ic clock-mode-style
1443: .Op Ic 12 | Ic 24
1444: .Xc
1445: Set clock hour format.
1446: .It Ic force-height Ar height
1447: .It Ic force-width Ar width
1448: Prevent
1449: .Nm
1450: from resizing a window to greater than
1451: .Ar width
1452: or
1453: .Ar height .
1454: A value of zero restores the default unlimited setting.
1.2 nicm 1455: .It Ic main-pane-width Ar width
1456: .It Ic main-pane-height Ar height
1457: Set the width or height of the main (left or top) pane in the
1458: .Ic main-horizontal
1459: or
1460: .Ic main-vertical
1461: layouts.
1.1 nicm 1462: .It Ic mode-attr Ar attributes
1463: Set window modes attributes.
1464: .It Ic mode-bg Ar colour
1465: Set window modes background colour.
1466: .It Ic mode-fg Ar colour
1467: Set window modes foreground colour.
1468: .It Xo Ic mode-keys
1469: .Op Ic vi | Ic emacs
1470: .Xc
1.6 jmc 1471: Use vi or emacs-style
1.1 nicm 1472: key bindings in scroll and copy modes.
1473: Key bindings default to emacs.
1474: .It Xo Ic monitor-activity
1475: .Op Ic on | Ic off
1476: .Xc
1477: Monitor for activity in the window.
1478: Windows with activity are highlighted in the status line.
1479: .It Xo Ic monitor-content Ar match-string
1480: .Xc
1.6 jmc 1481: Monitor content in the window.
1482: When
1.16 nicm 1483: .Xr fnmatch 3
1484: pattern
1.1 nicm 1485: .Ar match-string
1486: appears in the window, it is highlighted in the status line.
1487: .It Xo Ic remain-on-exit
1488: .Op Ic on | Ic off
1489: .Xc
1490: A window with this flag set is not destroyed when the program running in it
1491: exits.
1492: The window may be reactivated with the
1493: .Ic respawn-window
1494: command.
1495: .It Xo Ic utf8
1496: .Op Ic on | Ic off
1497: .Xc
1498: Instructs
1499: .Nm
1500: to expect UTF-8 sequences to appear in this window.
1501: .It Ic window-status-attr Ar attributes
1502: Set status line attributes for a single window.
1503: .It Ic window-status-bg Ar colour
1504: Set status line background colour for a single window.
1505: .It Ic window-status-fg Ar colour
1506: Set status line foreground colour for a single window.
1.40 nicm 1507: .It Ic window-status-current-attr Ar attributes
1508: Set status line attributes for the currently active window.
1509: .It Ic window-status-current-bg Ar colour
1510: Set status line background colour for the currently active window.
1511: .It Ic window-status-current-fg Ar colour
1512: Set status line foreground colour for the currently active window.
1.1 nicm 1513: .It Xo Ic xterm-keys
1514: .Op Ic on | Ic off
1515: .Xc
1516: If this option is set,
1517: .Nm
1518: will generate
1519: .Xr xterm 1 -style
1520: function key sequences; these have a number included to indicate modifiers such
1.6 jmc 1521: as Shift, Alt or Ctrl.
1.1 nicm 1522: .El
1523: .It Xo Ic show-buffer
1524: .Op Fl b Ar buffer-index
1525: .Op Fl t Ar target-session
1526: .Xc
1527: .D1 (alias: Ic showb )
1528: Display the contents of the specified buffer.
1529: .It Xo Ic show-options
1.18 nicm 1530: .Op Fl g
1.1 nicm 1531: .Op Fl t Ar target-session
1532: .Xc
1533: .D1 (alias: Ic show )
1.18 nicm 1534: Show the session options for
1535: .Ar target session ,
1536: or the global session options with
1537: .Fl g .
1.1 nicm 1538: .It Xo Ic show-window-options
1.18 nicm 1539: .Op Fl g
1.1 nicm 1540: .Op Fl t Ar target-window
1541: .Xc
1542: .D1 (alias: Ic showw )
1.18 nicm 1543: List the window options for
1544: .Ar target-window ,
1545: or the global window options if
1546: .Fl g
1547: is used.
1.1 nicm 1548: .It Xo Ic source-file
1549: .Ar path
1550: .Xc
1551: .D1 (alias: Ic source )
1552: Execute commands from
1553: .Ar path .
1554: .It Xo Ic split-window
1.38 nicm 1555: .Op Fl dhv
1.1 nicm 1556: .Oo Fl l
1.38 nicm 1557: .Ar size |
1.1 nicm 1558: .Fl p Ar percentage Oc
1559: .Op Fl t Ar target-window
1560: .Op Ar command
1561: .Xc
1562: .D1 (alias: splitw )
1.38 nicm 1563: Creates a new pane by splitting the active pane:
1564: .Fl h
1565: does a horizontal split and
1566: .Fl v
1567: a vertical split; if neither is specified,
1568: .Fl v
1569: is assumed.
1.1 nicm 1570: The
1571: .Fl l
1572: and
1573: .Fl p
1.38 nicm 1574: options specify the size of the new window in lines (for vertical split) or in
1575: cells (for horizontal split), or as a percentage, respectively.
1.1 nicm 1576: All other options have the same meaning as in the
1577: .Ic new-window
1578: command.
1579: .It Xo Ic start-server
1580: .Xc
1581: .D1 (alias: Ic start )
1582: Start the
1583: .Nm
1584: server, if not already running, without creating any sessions.
1585: .It Xo Ic suspend-client
1586: .Op Fl c target-client
1587: .Xc
1588: .D1 (alias: Ic suspendc )
1.6 jmc 1589: Suspend a client by sending
1590: .Dv SIGTSTP
1591: (tty stop).
1.1 nicm 1592: .It Xo Ic swap-pane
1593: .Op Fl dDU
1594: .Op Fl p Ar src-index
1595: .Op Fl t Ar target-window
1596: .Op Fl q Ar dst-index
1597: .Xc
1598: .D1 (alias: Ic swapp )
1599: Swap two panes within a window.
1600: If
1601: .Fl U
1602: is used, the pane is swapped with the pane above (before it numerically);
1603: .Fl D
1604: swaps with the pane below (the next numerically); or
1605: .Ar dst-index
1606: may be give to swap with a specific pane.
1607: .It Xo Ic swap-window
1608: .Op Fl d
1609: .Op Fl s Ar src-window
1610: .Op Fl t Ar dst-window
1611: .Xc
1612: .D1 (alias: Ic swapw )
1613: This is similar to
1614: .Ic link-window ,
1615: except the source and destination windows are swapped.
1616: It is an error if no window exists at
1617: .Ar src-window .
1618: .It Xo Ic switch-client
1.32 nicm 1619: .Op Fl c Ar target-client
1620: .Op Fl t Ar target-session
1.1 nicm 1621: .Xc
1622: .D1 (alias: Ic switchc )
1623: Switch the current session for client
1624: .Ar target-client
1625: to
1626: .Ar target-session .
1627: .It Xo Ic unbind-key
1.45 nicm 1628: .Op Fl n
1.1 nicm 1629: .Ar key
1630: .Xc
1631: .D1 (alias: Ic unbind )
1.42 nicm 1632: Unbind the command bound to
1.1 nicm 1633: .Ar key .
1.45 nicm 1634: If
1635: .Fl n
1636: is specified, the command bound to
1637: .Ar key
1638: without a prefix (if any) is removed.
1.1 nicm 1639: .It Xo Ic unlink-window
1.31 nicm 1640: .Op Fl k
1.1 nicm 1641: .Op Fl t Ar target-window
1642: .Xc
1643: .D1 (alias: Ic unlinkw )
1644: Unlink
1645: .Ar target-window .
1.31 nicm 1646: Unless
1647: .Fl k
1648: is given, a window may be unlinked only if it is linked to multiple sessions -
1649: windows may not be linked to no sessions;
1650: if
1651: .Fl k
1652: is specified and the window is linked to only one session, it is unlinked and
1653: destroyed.
1.1 nicm 1654: .It Xo Ic up-pane
1655: .Op Fl p Ar pane-index
1656: .Op Fl t Ar target-window
1657: .Xc
1658: .D1 (alias: Ic upp )
1659: Move up a pane.
1660: .El
1661: .Sh FILES
1.26 nicm 1662: .Bl -tag -width "/etc/tmux.confXXX" -compact
1.1 nicm 1663: .It Pa ~/.tmux.conf
1.6 jmc 1664: Default
1.1 nicm 1665: .Nm
1.6 jmc 1666: configuration file.
1.26 nicm 1667: .It Pa /etc/tmux.conf
1668: System-wide configuration file.
1.1 nicm 1669: .El
1670: .Sh SEE ALSO
1671: .Xr pty 4
1672: .Sh AUTHORS
1673: .An Nicholas Marriott Aq nicm@users.sourceforge.net