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