Annotation of src/usr.bin/tmux/tmux.1, Revision 1.47
1.47 ! nicm 1: .\" $OpenBSD: tmux.1,v 1.46 2009/07/27 12:11:11 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.47 ! nicm 17: .Dd $Mdocdate: July 27 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
1.47 ! nicm 1067: .Op Ar layout-name
1.2 nicm 1068: .Xc
1.17 nicm 1069: .D1 (alias: selectl )
1.2 nicm 1070: Choose a specific layout for a window.
1.47 ! nicm 1071: If
! 1072: .Ar layout-name
! 1073: is not given, the last layout used (if any) is reapplied.
1.1 nicm 1074: .It Xo Ic select-pane
1075: .Op Fl p Ar pane-index
1076: .Op Fl t Ar target-window
1077: .Xc
1078: .D1 (alias: Ic selectp )
1079: Make pane
1080: .Ar pane-index
1081: the active pane in window
1082: .Ar target-window .
1083: .It Xo Ic select-prompt
1084: .Op Fl t Ar target-client
1085: .Xc
1086: Open a prompt inside
1087: .Ar target-client
1088: allowing a window index to be entered interactively.
1089: .It Xo Ic select-window
1090: .Op Fl t Ar target-window
1091: .Xc
1092: .D1 (alias: Ic selectw )
1093: Select the window at
1094: .Ar target-window .
1095: .It Xo Ic send-keys
1096: .Op Fl t Ar target-window
1097: .Ar key Ar ...
1098: .Xc
1099: .D1 (alias: Ic send )
1100: Send a key or keys to a window.
1101: Each argument
1102: .Ar key
1103: is the name of the key (such as
1104: .Ql C-a
1105: or
1106: .Ql npage
1107: ) to send; if the string is not recognised as a key, it is sent as a series of
1108: characters.
1109: All arguments are sent sequentially from first to last.
1110: .It Xo Ic send-prefix
1111: .Op Fl t Ar target-window
1112: .Xc
1113: Send the prefix key to a window as if it was pressed.
1114: .It Xo Ic server-info
1115: .Xc
1116: .D1 (alias: Ic info )
1117: Show server information and terminal details.
1118: .It Xo Ic set-buffer
1119: .Op Fl b Ar buffer-index
1120: .Op Fl t Ar target-session
1121: .Ar data
1122: .Xc
1123: .D1 (alias: Ic setb )
1124: Set the contents of the specified buffer to
1125: .Ar data .
1126: .It Xo Ic set-option
1127: .Op Fl gu
1128: .Op Fl t Ar target-session
1129: .Ar option Ar value
1130: .Xc
1131: .D1 (alias: Ic set )
1.18 nicm 1132: Set a session option.
1.1 nicm 1133: If
1134: .Fl g
1.18 nicm 1135: is specified, the global session option is set.
1.1 nicm 1136: The
1137: .Fl u
1138: flag unsets an option, so a session inherits the option from the global
1139: options - it is not possible to unset a global option.
1140: .Pp
1.18 nicm 1141: Available session options are:
1.1 nicm 1142: .Bl -tag -width Ds
1143: .It Xo Ic bell-action
1144: .Op Ic any | Ic none | Ic current
1145: .Xc
1146: Set action on window bell.
1147: .Ic any
1148: means a bell in any window linked to a session causes a bell in the current
1149: window of that session,
1150: .Ic none
1151: means all bells are ignored and
1152: .Ic current
1153: means only bell in windows other than the current window are ignored.
1154: .It Ic buffer-limit Ar number
1155: Set the number of buffers kept for each session; as new buffers are added to
1156: the top of the stack, old ones are removed from the bottom if necessary to
1157: maintain this maximum length.
1158: .It Ic default-command Ar command
1159: Set the command used for new windows (if not specified when the window is
1160: created) to
1161: .Ar command .
1.19 nicm 1162: The default is an empty string, which instructs
1163: .Nm
1164: to create a login shell using the
1165: .Ev SHELL
1166: environment variable or, if it is unset, the user's shell returned by
1167: .Xr getpwuid 3 .
1.1 nicm 1168: .It Ic default-path Ar path
1169: Set the default working directory for processes created from keys, or
1170: interactively from the prompt.
1171: The default is the current working directory when the server is started.
1.22 nicm 1172: .It Ic default-terminal Ar terminal
1173: Set the default terminal for new windows created in this session - the
1174: default value of the
1175: .Ev TERM
1176: environment variable.
1177: For
1178: .Nm
1179: to work correctly, this
1180: .Em must
1181: be set to
1182: .Ql screen
1183: or a derivative of it.
1.21 nicm 1184: .It Ic display-time Ar time
1185: Set the amount of time for which status line messages are displayed.
1186: .Ar time
1187: is in milliseconds.
1.1 nicm 1188: .It Ic history-limit Ar lines
1189: Set the maximum number of lines held in window history.
1190: This setting applies only to new windows - existing window histories are not
1191: resized and retain the limit at the point they were created.
1192: .It Ic lock-after-time Ar number
1193: Lock the server after
1194: .Ar number
1195: seconds of inactivity.
1196: The default is off (set to 0).
1197: This has no effect as a session option; it must be set as a global option using
1198: .Fl g .
1199: .It Ic message-attr Ar attributes
1200: Set status line message attributes, where
1201: .Ar attributes
1202: is either
1203: .Ic default
1204: or a comma-delimited list of one or more of:
1205: .Ic bright
1206: (or
1207: .Ic bold ) ,
1208: .Ic dim ,
1209: .Ic underscore ,
1210: .Ic blink ,
1211: .Ic reverse ,
1212: .Ic hidden ,
1213: or
1214: .Ic italics .
1215: .It Ic message-bg Ar colour
1216: Set status line message background colour, where
1217: .Ar colour
1218: is one of:
1219: .Ic black ,
1220: .Ic red ,
1221: .Ic green ,
1222: .Ic yellow ,
1223: .Ic blue ,
1224: .Ic magenta ,
1225: .Ic cyan ,
1226: .Ic white
1227: or
1228: .Ic default .
1229: .It Ic message-fg Ar colour
1230: Set status line message foreground colour.
1231: .It Ic prefix Ar key
1232: Set the current prefix key.
1.21 nicm 1233: .It Ic repeat-time Ar time
1.1 nicm 1234: Allow multiple commands to be entered without pressing the prefix-key again
1235: in the specified
1.21 nicm 1236: .Ar time
1.1 nicm 1237: milliseconds (the default is 500).
1238: Whether a key repeats may be set when it is bound using the
1239: .Fl r
1240: flag to
1241: .Ic bind-key .
1242: Repeat is enabled for the default keys of the
1.44 sthen 1243: .Ic resize-pane-up
1.1 nicm 1244: and
1245: .Ic resize-pane-down
1246: commands.
1247: .It Xo Ic set-remain-on-exit
1248: .Op Ic on | Ic off
1249: .Xc
1250: Set the
1251: .Ic remain-on-exit
1252: window option for any windows first created in this session.
1253: .It Xo Ic set-titles
1254: .Op Ic on | Ic off
1255: .Xc
1256: Attempt to set the window title using the \ee]2;...\e007 xterm code and
1257: the terminal appears to be an xterm.
1.11 nicm 1258: This option is off by default.
1.6 jmc 1259: Note that elinks
1.1 nicm 1260: will only attempt to set the window title if the STY environment
1261: variable is set.
1262: .It Xo Ic status
1263: .Op Ic on | Ic off
1264: .Xc
1265: Show or hide the status line.
1266: .It Ic status-attr Ar attributes
1267: Set status line attributes.
1268: .It Ic status-bg Ar colour
1269: Set status line background colour.
1270: .It Ic status-fg Ar colour
1271: Set status line foreground colour.
1272: .It Ic status-interval Ar interval
1273: Update the status bar every
1274: .Ar interval
1275: seconds.
1276: By default, updates will occur every 15 seconds.
1277: A setting of zero disables redrawing at interval.
1.41 nicm 1278: .It Xo Ic status-justify
1279: .Op Ic left | Ic centre | Ic right
1280: .Xc
1281: Set the position of the window list component of the status line: left, centre
1282: or right justified.
1.1 nicm 1283: .It Xo Ic status-keys
1284: .Op Ic vi | Ic emacs
1285: .Xc
1.6 jmc 1286: Use vi or emacs-style
1.1 nicm 1287: key bindings in the status line, for example at the command prompt.
1288: Defaults to emacs.
1289: .It Ic status-left Ar string
1290: Display
1291: .Ar string
1292: to the left of the status bar.
1293: .Ar string
1294: will be passed through
1295: .Xr strftime 3
1296: before being used.
1297: By default, the session name is shown.
1298: .Ar string
1299: may contain any of the following special character pairs:
1300: .Bl -column "Character pair" "Replaced with" -offset indent
1301: .It Sy "Character pair" Ta Sy "Replaced with"
1302: .It Li "#(command)" Ta "First line of command's output"
1303: .It Li "#H" Ta "Hostname of local host"
1.35 nicm 1304: .It Li "#I" Ta "Current window index"
1305: .It Li "#P" Ta "Current pane index"
1.1 nicm 1306: .It Li "#S" Ta "Session name"
1307: .It Li "#T" Ta "Current window title"
1.35 nicm 1308: .It Li "#W" Ta "Current window name"
1.1 nicm 1309: .It Li "##" Ta "A literal" Ql #
1310: .El
1311: .Pp
1312: Where appropriate, these may be prefixed with a number to specify the maximum
1313: length, for example
1314: .Ql #24T .
1.10 nicm 1315: .Pp
1.12 jmc 1316: By default, UTF-8 in
1.10 nicm 1317: .Ar string
1318: is not interpreted, to enable UTF-8, use the
1319: .Ic status-utf8
1320: option.
1.1 nicm 1321: .It Ic status-left-length Ar length
1322: Set the maximum
1323: .Ar length
1324: of the left component of the status bar.
1325: The default is 10.
1326: .It Ic status-right Ar string
1327: Display
1328: .Ar string
1329: to the right of the status bar.
1330: By default, the date and time will be shown.
1331: As with
1332: .Ic status-left ,
1333: .Ar string
1334: will be passed to
1.10 nicm 1335: .Xr strftime 3 ,
1336: character pairs are replaced, and UTF-8 is dependent on the
1337: .Ic status-utf8
1338: option.
1.1 nicm 1339: .It Ic status-right-length Ar length
1340: Set the maximum
1341: .Ar length
1342: of the right component of the status bar.
1343: The default is 40.
1.10 nicm 1344: .Pp
1345: .It Xo Ic status-utf8
1346: .Op Ic on | Ic off
1347: .Xc
1348: Instruct
1349: .Nm
1350: to treat top-bit-set characters in the
1351: .Ic status-left
1352: and
1353: .Ic status-right
1354: strings as UTF-8; notably, this is important for wide characters.
1355: This option defaults to off.
1.37 nicm 1356: .It Xo Ic visual-activity
1357: .Op Ic on | Ic off
1358: .Xc
1359: If on, display a status line message when activity occurs in a window
1.39 jmc 1360: for which the
1.37 nicm 1361: .Ic monitor-activity
1362: window option is enabled.
1363: .It Xo Ic visual-bell
1364: .Op Ic on | Ic off
1365: .Xc
1366: If this option is on, a message is shown on a bell instead of it being passed
1367: through to the terminal (which normally makes a sound).
1368: Also see the
1369: .Ic bell-action
1370: option.
1371: .It Xo Ic visual-content
1372: .Op Ic on | Ic off
1373: .Xc
1374: Like
1375: .Ic visual-activity ,
1376: display a message when content is present in a window
1.39 jmc 1377: for which the
1.37 nicm 1378: .Ic monitor-content
1379: window option is enabled.
1.1 nicm 1380: .El
1381: .It Xo Ic set-password
1382: .Op Fl c
1383: .Ar password
1384: .Xc
1385: .D1 (alias: Ic pass )
1386: Set the server password.
1387: If the
1388: .Fl c
1389: option is given, a pre-encrypted password may be specified.
1390: By default, the password is blank, thus any entered password will be accepted
1391: when unlocking the server (see the
1392: .Ic lock-server
1393: command).
1394: To prevent variable expansion when an encrypted password is read from a
1395: configuration file, enclose it in single quotes (').
1396: .It Xo Ic set-window-option
1397: .Op Fl gu
1398: .Op Fl t Ar target-window
1399: .Ar option Ar value
1400: .Xc
1401: .D1 (alias: Ic setw )
1.18 nicm 1402: Set a window option.
1.1 nicm 1403: The
1404: .Fl g
1405: and
1406: .Fl u
1407: flags work similarly to the
1408: .Ic set-option
1409: command.
1410: .Pp
1.18 nicm 1411: Supported window options are:
1.1 nicm 1412: .Bl -tag -width Ds
1413: .It Xo Ic aggressive-resize
1414: .Op Ic on | Ic off
1415: .Xc
1416: Aggressively resize the chosen window.
1417: This means that
1418: .Nm
1419: will resize the window to the size of the smallest session for which it is the
1420: current window, rather than the smallest session to which it is attached.
1421: The window may resize when the current window is changed on another sessions;
1.6 jmc 1422: this option is good for full-screen programs which support
1423: .Dv SIGWINCH
1424: and poor for interactive programs such as shells.
1.1 nicm 1425: .It Xo Ic automatic-rename
1426: .Op Ic on | Ic off
1427: .Xc
1428: Control automatic window renaming.
1429: When this setting is enabled,
1430: .Nm
1431: will attempt - on supported platforms - to rename the window to reflect the
1432: command currently running in it.
1433: This flag is automatically disabled for an individual window when a name
1434: is specified at creation with
1435: .Ic new-window or
1436: .Ic new-session ,
1437: or later with
1438: .Ic rename-window .
1439: It may be switched off globally with:
1440: .Bd -literal -offset indent
1441: set-window-option -g automatic-rename off
1442: .Ed
1443: .It Ic clock-mode-colour Ar colour
1444: Set clock colour.
1445: .It Xo Ic clock-mode-style
1446: .Op Ic 12 | Ic 24
1447: .Xc
1448: Set clock hour format.
1449: .It Ic force-height Ar height
1450: .It Ic force-width Ar width
1451: Prevent
1452: .Nm
1453: from resizing a window to greater than
1454: .Ar width
1455: or
1456: .Ar height .
1457: A value of zero restores the default unlimited setting.
1.2 nicm 1458: .It Ic main-pane-width Ar width
1459: .It Ic main-pane-height Ar height
1460: Set the width or height of the main (left or top) pane in the
1461: .Ic main-horizontal
1462: or
1463: .Ic main-vertical
1464: layouts.
1.1 nicm 1465: .It Ic mode-attr Ar attributes
1466: Set window modes attributes.
1467: .It Ic mode-bg Ar colour
1468: Set window modes background colour.
1469: .It Ic mode-fg Ar colour
1470: Set window modes foreground colour.
1471: .It Xo Ic mode-keys
1472: .Op Ic vi | Ic emacs
1473: .Xc
1.6 jmc 1474: Use vi or emacs-style
1.1 nicm 1475: key bindings in scroll and copy modes.
1476: Key bindings default to emacs.
1477: .It Xo Ic monitor-activity
1478: .Op Ic on | Ic off
1479: .Xc
1480: Monitor for activity in the window.
1481: Windows with activity are highlighted in the status line.
1482: .It Xo Ic monitor-content Ar match-string
1483: .Xc
1.6 jmc 1484: Monitor content in the window.
1485: When
1.16 nicm 1486: .Xr fnmatch 3
1487: pattern
1.1 nicm 1488: .Ar match-string
1489: appears in the window, it is highlighted in the status line.
1490: .It Xo Ic remain-on-exit
1491: .Op Ic on | Ic off
1492: .Xc
1493: A window with this flag set is not destroyed when the program running in it
1494: exits.
1495: The window may be reactivated with the
1496: .Ic respawn-window
1497: command.
1498: .It Xo Ic utf8
1499: .Op Ic on | Ic off
1500: .Xc
1501: Instructs
1502: .Nm
1503: to expect UTF-8 sequences to appear in this window.
1504: .It Ic window-status-attr Ar attributes
1505: Set status line attributes for a single window.
1506: .It Ic window-status-bg Ar colour
1507: Set status line background colour for a single window.
1508: .It Ic window-status-fg Ar colour
1509: Set status line foreground colour for a single window.
1.40 nicm 1510: .It Ic window-status-current-attr Ar attributes
1511: Set status line attributes for the currently active window.
1512: .It Ic window-status-current-bg Ar colour
1513: Set status line background colour for the currently active window.
1514: .It Ic window-status-current-fg Ar colour
1515: Set status line foreground colour for the currently active window.
1.1 nicm 1516: .It Xo Ic xterm-keys
1517: .Op Ic on | Ic off
1518: .Xc
1519: If this option is set,
1520: .Nm
1521: will generate
1522: .Xr xterm 1 -style
1523: function key sequences; these have a number included to indicate modifiers such
1.6 jmc 1524: as Shift, Alt or Ctrl.
1.1 nicm 1525: .El
1526: .It Xo Ic show-buffer
1527: .Op Fl b Ar buffer-index
1528: .Op Fl t Ar target-session
1529: .Xc
1530: .D1 (alias: Ic showb )
1531: Display the contents of the specified buffer.
1532: .It Xo Ic show-options
1.18 nicm 1533: .Op Fl g
1.1 nicm 1534: .Op Fl t Ar target-session
1535: .Xc
1536: .D1 (alias: Ic show )
1.18 nicm 1537: Show the session options for
1538: .Ar target session ,
1539: or the global session options with
1540: .Fl g .
1.1 nicm 1541: .It Xo Ic show-window-options
1.18 nicm 1542: .Op Fl g
1.1 nicm 1543: .Op Fl t Ar target-window
1544: .Xc
1545: .D1 (alias: Ic showw )
1.18 nicm 1546: List the window options for
1547: .Ar target-window ,
1548: or the global window options if
1549: .Fl g
1550: is used.
1.1 nicm 1551: .It Xo Ic source-file
1552: .Ar path
1553: .Xc
1554: .D1 (alias: Ic source )
1555: Execute commands from
1556: .Ar path .
1557: .It Xo Ic split-window
1.38 nicm 1558: .Op Fl dhv
1.1 nicm 1559: .Oo Fl l
1.38 nicm 1560: .Ar size |
1.1 nicm 1561: .Fl p Ar percentage Oc
1562: .Op Fl t Ar target-window
1563: .Op Ar command
1564: .Xc
1565: .D1 (alias: splitw )
1.38 nicm 1566: Creates a new pane by splitting the active pane:
1567: .Fl h
1568: does a horizontal split and
1569: .Fl v
1570: a vertical split; if neither is specified,
1571: .Fl v
1572: is assumed.
1.1 nicm 1573: The
1574: .Fl l
1575: and
1576: .Fl p
1.38 nicm 1577: options specify the size of the new window in lines (for vertical split) or in
1578: cells (for horizontal split), or as a percentage, respectively.
1.1 nicm 1579: All other options have the same meaning as in the
1580: .Ic new-window
1581: command.
1582: .It Xo Ic start-server
1583: .Xc
1584: .D1 (alias: Ic start )
1585: Start the
1586: .Nm
1587: server, if not already running, without creating any sessions.
1588: .It Xo Ic suspend-client
1589: .Op Fl c target-client
1590: .Xc
1591: .D1 (alias: Ic suspendc )
1.6 jmc 1592: Suspend a client by sending
1593: .Dv SIGTSTP
1594: (tty stop).
1.1 nicm 1595: .It Xo Ic swap-pane
1596: .Op Fl dDU
1597: .Op Fl p Ar src-index
1598: .Op Fl t Ar target-window
1599: .Op Fl q Ar dst-index
1600: .Xc
1601: .D1 (alias: Ic swapp )
1602: Swap two panes within a window.
1603: If
1604: .Fl U
1605: is used, the pane is swapped with the pane above (before it numerically);
1606: .Fl D
1607: swaps with the pane below (the next numerically); or
1608: .Ar dst-index
1609: may be give to swap with a specific pane.
1610: .It Xo Ic swap-window
1611: .Op Fl d
1612: .Op Fl s Ar src-window
1613: .Op Fl t Ar dst-window
1614: .Xc
1615: .D1 (alias: Ic swapw )
1616: This is similar to
1617: .Ic link-window ,
1618: except the source and destination windows are swapped.
1619: It is an error if no window exists at
1620: .Ar src-window .
1621: .It Xo Ic switch-client
1.32 nicm 1622: .Op Fl c Ar target-client
1623: .Op Fl t Ar target-session
1.1 nicm 1624: .Xc
1625: .D1 (alias: Ic switchc )
1626: Switch the current session for client
1627: .Ar target-client
1628: to
1629: .Ar target-session .
1630: .It Xo Ic unbind-key
1.45 nicm 1631: .Op Fl n
1.1 nicm 1632: .Ar key
1633: .Xc
1634: .D1 (alias: Ic unbind )
1.42 nicm 1635: Unbind the command bound to
1.1 nicm 1636: .Ar key .
1.45 nicm 1637: If
1638: .Fl n
1639: is specified, the command bound to
1640: .Ar key
1641: without a prefix (if any) is removed.
1.1 nicm 1642: .It Xo Ic unlink-window
1.31 nicm 1643: .Op Fl k
1.1 nicm 1644: .Op Fl t Ar target-window
1645: .Xc
1646: .D1 (alias: Ic unlinkw )
1647: Unlink
1648: .Ar target-window .
1.31 nicm 1649: Unless
1650: .Fl k
1651: is given, a window may be unlinked only if it is linked to multiple sessions -
1652: windows may not be linked to no sessions;
1653: if
1654: .Fl k
1655: is specified and the window is linked to only one session, it is unlinked and
1656: destroyed.
1.1 nicm 1657: .It Xo Ic up-pane
1658: .Op Fl p Ar pane-index
1659: .Op Fl t Ar target-window
1660: .Xc
1661: .D1 (alias: Ic upp )
1662: Move up a pane.
1663: .El
1664: .Sh FILES
1.26 nicm 1665: .Bl -tag -width "/etc/tmux.confXXX" -compact
1.1 nicm 1666: .It Pa ~/.tmux.conf
1.6 jmc 1667: Default
1.1 nicm 1668: .Nm
1.6 jmc 1669: configuration file.
1.26 nicm 1670: .It Pa /etc/tmux.conf
1671: System-wide configuration file.
1.1 nicm 1672: .El
1673: .Sh SEE ALSO
1674: .Xr pty 4
1675: .Sh AUTHORS
1676: .An Nicholas Marriott Aq nicm@users.sourceforge.net