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