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