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