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