Annotation of src/usr.bin/tmux/tmux.1, Revision 1.94
1.94 ! nicm 1: .\" $OpenBSD: tmux.1,v 1.93 2009/10/04 08:50:05 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.94 ! nicm 17: .Dd $Mdocdate: October 4 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
1.90 nicm 26: .Op Fl 28dlquv
1.91 nicm 27: .Op Fl c Ar shell-command
1.1 nicm 28: .Op Fl f Ar file
29: .Op Fl L Ar socket-name
30: .Op Fl S Ar socket-path
31: .Op Ar command Op Ar flags
32: .Ek
33: .Sh DESCRIPTION
34: .Nm
1.59 jmc 35: is a terminal multiplexer:
36: it enables a number of terminals to be created, accessed, and
37: controlled from a single screen.
1.67 jmc 38: .Nm
39: may be detached from a screen
40: and continue running in the background,
41: then later reattached.
1.1 nicm 42: .Pp
1.60 nicm 43: When
44: .Nm
45: is started it creates a new
46: .Em session
47: with a single
48: .Em window
49: and displays it on screen.
50: A status line at the bottom of the screen
51: shows information on the current session
52: and is used to enter interactive commands.
53: .Pp
54: A session is a single collection of
55: .Em pseudo terminals
56: under the management of
57: .Nm .
58: Each session has one or more
59: windows linked to it.
60: A window occupies the entire screen
61: and may be split into rectangular panes,
62: each of which is a separate pseudo terminal
63: (the
64: .Xr pty 4
65: manual page documents the technical details of pseudo terminals).
66: Any number of
67: .Nm
68: instances may connect to the same session,
69: and any number of windows may be present in the same session.
70: Once all sessions are killed,
71: .Nm
72: exits.
73: .Pp
1.64 nicm 74: Each session is persistent and will survive accidental disconnection
1.66 jmc 75: (such as
1.64 nicm 76: .Xr ssh 1
1.67 jmc 77: connection timeout) or intentional detaching (with the
1.64 nicm 78: .Ql C-b d
79: key strokes).
80: .Nm
81: may be reattached using:
82: .Pp
83: .Dl $ tmux attach
1.60 nicm 84: .Pp
1.64 nicm 85: In
86: .Nm ,
87: a session is displayed on screen by a
88: .Em client
89: and all sessions are managed by a single
90: .Em server .
91: The server and each client are separate processes which communicate through a
92: socket in
93: .Pa /tmp .
1.65 nicm 94: .Pp
1.1 nicm 95: The options are as follows:
96: .Bl -tag -width "XXXXXXXXXXXX"
97: .It Fl 2
98: Force
99: .Nm
100: to assume the terminal supports 256 colours.
101: .It Fl 8
102: Like
103: .Fl 2 ,
1.6 jmc 104: but indicates that the terminal supports 88 colours.
1.91 nicm 105: .It Fl c Ar shell-command
106: Execute
107: .Ar shell-command
108: using the default shell.
109: If necessary, the
110: .Nm
111: server will be started to retrieve the
112: .Ic default-shell
113: option.
1.1 nicm 114: .It Fl d
115: Force
116: .Nm
117: to assume the terminal supports default colours.
118: .It Fl f Ar file
119: Specify an alternative configuration file.
120: By default,
121: .Nm
1.26 nicm 122: loads the system configuration file from
123: .Pa /etc/tmux.conf ,
124: if present, then looks for a user configuration file at
1.1 nicm 125: .Pa ~/.tmux.conf .
126: The configuration file is a set of
127: .Nm
128: commands which are executed in sequence when the server is first started.
1.61 nicm 129: .Pp
130: If a command in the configuration file fails,
131: .Nm
132: will report an error and exit without executing further commands.
1.82 nicm 133: .It Fl l
134: Behave as a login shell.
135: This flag currently has no effect and is for compatibility with other shells
136: when using tmux as a login shell.
1.1 nicm 137: .It Fl L Ar socket-name
138: .Nm
139: stores the server socket in a directory under
140: .Pa /tmp ;
141: the default socket is named
142: .Em default .
143: This option allows a different socket name to be specified, allowing several
144: independent
145: .Nm
146: servers to be run.
147: Unlike
148: .Fl S
149: a full path is not necessary: the sockets are all created in the same
150: directory.
1.2 nicm 151: .Pp
152: If the socket is accidentally removed, the
1.6 jmc 153: .Dv SIGUSR1
1.2 nicm 154: signal may be sent to the
155: .Nm
156: server process to recreate it.
1.4 sobrado 157: .It Fl q
1.6 jmc 158: Prevent the server sending various informational messages, for example when
1.4 sobrado 159: window flags are altered.
1.1 nicm 160: .It Fl S Ar socket-path
161: Specify a full alternative path to the server socket.
162: If
163: .Fl S
164: is specified, the default socket directory is not used and any
165: .Fl L
166: flag is ignored.
167: .It Fl u
168: .Nm
1.14 nicm 169: attempts to guess if the terminal is likely to support UTF-8 by checking the
170: first of the
171: .Ev LC_ALL ,
172: .Ev LC_CTYPE
173: and
1.2 nicm 174: .Ev LANG
1.14 nicm 175: environment variables to be set for the string "UTF-8".
1.5 nicm 176: This is not always correct: the
1.2 nicm 177: .Fl u
178: flag explicitly informs
179: .Nm
1.6 jmc 180: that UTF-8 is supported.
1.33 nicm 181: .Pp
182: If the server is started from a client passed
183: .Fl u
184: or where UTF-8 is detected, the
185: .Ic utf8
186: and
187: .Ic status-utf8
188: options are enabled in the global window and session options respectively.
1.1 nicm 189: .It Fl v
190: Request verbose logging.
191: This option may be specified multiple times for increasing verbosity.
192: Log messages will be saved into
193: .Pa tmux-client-PID.log
194: and
195: .Pa tmux-server-PID.log
196: files in the current directory, where
197: .Em PID
1.6 jmc 198: is the PID of the server or client process.
1.1 nicm 199: .It Ar command Op Ar flags
200: This specifies one of a set of commands used to control
201: .Nm ,
1.6 jmc 202: as described in the following sections.
1.59 jmc 203: If no commands are specified, the
1.1 nicm 204: .Ic new-session
205: command is assumed.
1.57 jmc 206: .El
1.64 nicm 207: .Sh KEY BINDINGS
208: .Nm
209: may be controlled from an attached client by using a key combination of a
210: prefix key,
211: .Ql C-b
212: (Ctrl-b) by default, followed by a command key.
213: .Pp
214: Some of the default key bindings are:
215: .Pp
1.67 jmc 216: .Bl -tag -width Ds -offset indent -compact
1.64 nicm 217: .It c
1.65 nicm 218: Create a new window.
1.64 nicm 219: .It d
1.65 nicm 220: Detach the current client.
1.64 nicm 221: .It l
1.65 nicm 222: Move to the previously selected window.
1.64 nicm 223: .It n
1.65 nicm 224: Change to the next window.
1.64 nicm 225: .It p
1.65 nicm 226: Change to the previous window.
227: .It &
228: Kill the current window.
229: .It ,
230: Rename the current window.
1.64 nicm 231: .It \&?
1.65 nicm 232: List all key bindings.
1.64 nicm 233: .El
234: .Pp
235: A complete list may be obtained with the
236: .Ic list-keys
237: command (bound to
238: .Ql \&?
239: by default).
240: Key bindings may be changed with the
241: .Ic bind-key
242: and
243: .Ic unbind-key
244: commands.
1.57 jmc 245: .Sh COMMANDS
246: This section contains a list of the commands supported by
247: .Nm .
248: Most commands accept the optional
249: .Fl t
250: argument with one of
251: .Ar target-client ,
252: .Ar target-session
253: .Ar target-window ,
254: or
255: .Ar target-pane .
256: These specify the client, session, window or pane which a command should affect.
257: .Ar target-client
258: is the name of the
259: .Xr pty 4
260: file to which the client is connected, for example either of
261: .Pa /dev/ttyp1
262: or
263: .Pa ttyp1
264: for the client attached to
265: .Pa /dev/ttyp1 .
266: If no client is specified, the current client is chosen, if possible, or an
267: error is reported.
268: Clients may be listed with the
269: .Ic list-clients
270: command.
1.1 nicm 271: .Pp
1.57 jmc 272: .Ar target-session
273: is either the name of a session (as listed by the
274: .Ic list-sessions
275: command) or the name of a client with the same syntax as
276: .Ar target-client ,
277: in which case the session attached to the client is used.
278: When looking for the session name,
279: .Nm
280: initially searches for an exact match; if none is found, the session names
281: are checked for any for which
282: .Ar target-session
283: is a prefix or for which it matches as an
284: .Xr fnmatch 3
285: pattern.
286: If a single match is found, it is used as the target session; multiple matches
287: produce an error.
288: If a session is omitted, the current session is used if available; if no
289: current session is available, the most recently created is chosen.
1.1 nicm 290: .Pp
1.57 jmc 291: .Ar target-window
292: specifies a window in the form
293: .Em session Ns \&: Ns Em window .
294: .Em session
295: follows the same rules as for
296: .Ar target-session ,
297: and
298: .Em window
299: is looked for in order: as a window index, for example mysession:1; as an exact
300: window name, such as mysession:mywindow; then as an
301: .Xr fnmatch 3
302: pattern or the start of a window name, such as mysession:mywin* or
303: mysession:mywin.
304: An empty window name specifies the next unused index if appropriate (for
305: example the
306: .Ic new-window
307: and
308: .Ic link-window
309: commands)
310: otherwise the current window in
311: .Em session
312: is chosen.
313: When the argument does not contain a colon,
314: .Nm
315: first attempts to parse it as window; if that fails, an attempt is made to
316: match a session.
1.1 nicm 317: .Pp
1.57 jmc 318: .Ar target-pane
319: takes a similar form to
320: .Ar target-window
321: but with the optional addition of a period followed by a pane index, for
322: example: mysession:mywindow.1.
323: If the pane index is omitted, the currently active pane in the specified
324: window is used.
325: If neither a colon nor period appears,
1.13 nicm 326: .Nm
1.57 jmc 327: first attempts to use the argument as a pane index; if that fails, it is looked
328: up as for
329: .Ar target-window .
1.15 jmc 330: .Pp
1.57 jmc 331: Multiple commands may be specified together as part of a
332: .Em command sequence .
333: Each command should be separated by spaces and a semicolon;
334: commands are executed sequentially from left to right.
335: A literal semicolon may be included by escaping it with a backslash (for
336: example, when specifying a command sequence to
337: .Ic bind-key ) .
1.13 nicm 338: .Pp
1.57 jmc 339: Examples include:
1.13 nicm 340: .Bd -literal -offset indent
1.57 jmc 341: refresh-client -t/dev/ttyp2
342:
343: rename-session -tfirst newname
344:
345: set-window-option -t:0 monitor-activity on
346:
347: new-window ; split-window -d
1.13 nicm 348: .Ed
1.57 jmc 349: .Sh CLIENTS AND SESSIONS
350: The following commands are available:
351: .Bl -tag -width Ds
352: .It Xo Ic attach-session
353: .Op Fl d
354: .Op Fl t Ar target-session
355: .Xc
356: .D1 (alias: Ic attach )
357: If run from outside
358: .Nm ,
359: create a new client in the current terminal and attach it to
360: .Ar target-session .
361: If used from inside, switch the current client.
362: If
363: .Fl d
364: is specified, any other clients attached to the session are detached.
1.13 nicm 365: .Pp
1.57 jmc 366: If no server is started,
367: .Ic attach-session
368: will attempt to start it; this will fail unless sessions are created in the
369: configuration file.
370: .It Ic detach-client Op Fl t Ar target-client
371: .D1 (alias: Ic detach )
372: Detach the current client if bound to a key, or the specified client with
373: .Fl t .
374: .It Ic has-session Op Fl t Ar target-session
375: .D1 (alias: Ic has )
376: Report an error and exit with 1 if the specified session does not exist.
377: If it does exist, exit with 0.
378: .It Ic kill-server
379: Kill the
1.1 nicm 380: .Nm
1.57 jmc 381: server and clients and destroy all sessions.
382: .It Ic kill-session Op Fl t Ar target-session
383: Destroy the given session, closing any windows linked to it and no other
384: sessions, and detaching all clients attached to it.
385: .It Ic list-clients
386: .D1 (alias: Ic lsc )
387: List all clients attached to the server.
388: .It Ic list-commands
389: .D1 (alias: Ic lscm )
390: List the syntax of all commands supported by
391: .Nm .
392: .It Ic list-sessions
393: .D1 (alias: Ic ls )
394: List all sessions managed by the server.
1.92 nicm 395: .It Xo Ic lock-client
396: .Op Fl t Ar target-client
397: .Xc
398: Lock
399: .Ar target-client ,
400: see the
401: .Ic lock-server
402: command.
403: .It Xo Ic lock-session
404: .Op Fl t Ar target-session
405: .Xc
406: Lock all clients attached to
407: .Ar target-session .
1.57 jmc 408: .It Xo Ic new-session
409: .Op Fl d
410: .Op Fl n Ar window-name
411: .Op Fl s Ar session-name
412: .Op Ar command
413: .Xc
414: .D1 (alias: Ic new )
415: Create a new session with name
416: .Ar session-name .
417: The new session is attached to the current terminal unless
418: .Fl d
419: is given.
420: .Ar window-name
1.1 nicm 421: and
1.57 jmc 422: .Ar command
423: are the name of and command to execute in the initial window.
1.68 nicm 424: .Pp
425: If run from a terminal, any
426: .Xr termios 4
427: special characters are saved and used for new windows in the new session.
1.57 jmc 428: .It Ic refresh-client Op Fl t Ar target-client
429: .D1 (alias: Ic refresh )
430: Refresh the current client if bound to a key, or a single client if one is given
431: with
432: .Fl t .
433: .It Xo Ic rename-session
434: .Op Fl t Ar target-session
435: .Ar new-name
436: .Xc
437: .D1 (alias: Ic rename )
438: Rename the session to
439: .Ar new-name .
440: .It Ic source-file Ar path
441: .D1 (alias: Ic source )
442: Execute commands from
443: .Ar path .
444: .It Ic start-server
445: .D1 (alias: Ic start )
446: Start the
1.1 nicm 447: .Nm
1.57 jmc 448: server, if not already running, without creating any sessions.
449: .It Xo Ic suspend-client
450: .Op Fl c Ar target-client
451: .Xc
452: .D1 (alias: Ic suspendc )
453: Suspend a client by sending
454: .Dv SIGTSTP
455: (tty stop).
456: .It Xo Ic switch-client
457: .Op Fl c Ar target-client
458: .Op Fl t Ar target-session
459: .Xc
460: .D1 (alias: Ic switchc )
461: Switch the current session for client
462: .Ar target-client
463: to
464: .Ar target-session .
465: .El
466: .Sh WINDOWS AND PANES
1.1 nicm 467: A
468: .Nm
469: window may be in one of several modes.
470: The default permits direct access to the terminal attached to the window.
471: The others are:
472: .Bl -tag -width Ds
473: .It Em output mode
474: This is entered when a command which produces output, such as
475: .Ic list-keys ,
476: is executed from a key binding.
477: .It Em scroll mode
478: This is entered with the
479: .Ic scroll-mode
480: command (bound to
481: .Ql =
482: by default) and permits the window history buffer to be inspected.
483: .It Em copy mode
484: This permits a section of a window or its history to be copied to a
485: .Em paste buffer
486: for later insertion into another window.
487: This mode is entered with the
488: .Ic copy-mode
489: command, bound to
490: .Ql [
491: by default.
492: .El
493: .Pp
1.6 jmc 494: The keys available depend on whether emacs or vi mode is selected
495: (see the
1.1 nicm 496: .Ic mode-keys
497: option).
498: The following keys are supported as appropriate for the mode:
499: .Bl -column "FunctionXXXXXXXXXXXX" "viXXXXXX" "emacs" -offset indent
500: .It Sy "Function" Ta Sy "vi" Ta Sy "emacs"
1.27 nicm 501: .It Li "Back to indentation" Ta "^" Ta "M-m"
1.1 nicm 502: .It Li "Clear selection" Ta "Escape" Ta "C-g"
503: .It Li "Copy selection" Ta "Enter" Ta "M-w"
504: .It Li "Cursor down" Ta "j" Ta "Down"
1.70 nicm 505: .It Li "Cursor left" Ta "h" Ta "Left"
506: .It Li "Cursor right" Ta "l" Ta "Right"
507: .It Li "Cursor up" Ta "k" Ta "Up"
1.71 nicm 508: .It Li "Delete entire line" Ta "d" Ta "C-u"
1.70 nicm 509: .It Li "Delete to end of line" Ta "D" Ta "C-k"
1.1 nicm 510: .It Li "End of line" Ta "$" Ta "C-e"
1.94 ! nicm 511: .It Li "Goto line" Ta ":" Ta "g"
1.1 nicm 512: .It Li "Next page" Ta "C-f" Ta "Page down"
513: .It Li "Next word" Ta "w" Ta "M-f"
1.70 nicm 514: .It Li "Paste buffer" Ta "p" Ta "C-y"
1.1 nicm 515: .It Li "Previous page" Ta "C-u" Ta "Page up"
516: .It Li "Previous word" Ta "b" Ta "M-b"
517: .It Li "Quit mode" Ta "q" Ta "Escape"
1.70 nicm 518: .It Li "Search again" Ta "n" Ta "n"
519: .It Li "Search backward" Ta "?" Ta "C-r"
520: .It Li "Search forward" Ta "/" Ta "C-s"
521: .It Li "Start of line" Ta "0" Ta "C-a"
1.1 nicm 522: .It Li "Start selection" Ta "Space" Ta "C-Space"
1.80 nicm 523: .It Li "Transpose chars" Ta "" Ta "C-t"
1.1 nicm 524: .El
525: .Pp
1.48 nicm 526: These key bindings are defined in a set of named tables:
527: .Em vi-edit
528: and
529: .Em emacs-edit
530: for keys used when line editing at the command prompt;
531: .Em vi-choice
532: and
533: .Em emacs-choice
534: for keys used when choosing from lists (such as produced by the
535: .Ic window-choose
536: command) or in output mode; and
537: .Em vi-copy
538: and
539: .Em emacs-copy
540: used in copy and scroll modes.
541: The tables may be viewed with the
542: .Ic list-keys
1.49 nicm 543: command and keys modified or removed with
544: .Ic bind-key
545: and
546: .Ic unbind-key .
1.48 nicm 547: .Pp
1.2 nicm 548: The paste buffer key pastes the first line from the top paste buffer on the
549: stack.
1.57 jmc 550: .Pp
551: The mode commands are as follows:
552: .Bl -tag -width Ds
553: .It Xo Ic copy-mode
554: .Op Fl u
1.72 nicm 555: .Op Fl t Ar target-pane
1.57 jmc 556: .Xc
557: Enter copy mode.
558: The
559: .Fl u
560: option scrolls one page up.
561: .It Xo Ic scroll-mode
562: .Op Fl u
1.72 nicm 563: .Op Fl t Ar target-pane
1.57 jmc 564: .Xc
565: Enter scroll mode.
566: The
567: .Fl u
568: has the same meaning as in the
1.1 nicm 569: .Ic copy-mode
1.18 nicm 570: command.
1.57 jmc 571: .El
1.18 nicm 572: .Pp
1.1 nicm 573: Each window displayed by
574: .Nm
575: may be split into one or more
576: .Em panes ;
577: each pane takes up a certain area of the display and is a separate terminal.
578: A window may be split into panes using the
579: .Ic split-window
580: command.
1.38 nicm 581: Windows may be split horizontally (with the
582: .Fl h
583: flag) or vertically.
584: Panes may be resized with the
585: .Ic resize-pane
1.1 nicm 586: command (bound to
1.38 nicm 587: .Ql C-up ,
588: .Ql C-down
589: .Ql C-left
590: and
591: .Ql C-right
1.1 nicm 592: by default), the current pane may be changed with the
593: .Ic up-pane
594: and
595: .Ic down-pane
596: commands and the
597: .Ic rotate-window
598: and
599: .Ic swap-pane
1.38 nicm 600: commands may be used to swap panes without changing their position.
601: Panes are numbered beginning from zero in the order they are created.
602: .Pp
603: A number of preset
604: .Em layouts
605: are available.
606: These may be selected with the
607: .Ic select-layout
608: command or cycled with
609: .Ic next-layout
610: (bound to
611: .Ql C-space
612: by default); once a layout is chosen, panes within it may be moved and resized as normal.
1.1 nicm 613: .Pp
614: The following layouts are supported:
615: .Bl -tag -width Ds
616: .It Ic even-horizontal
617: Panes are spread out evenly from left to right across the window.
618: .It Ic even-vertical
619: Panes are spread evenly from top to bottom.
1.2 nicm 620: .It Ic main-horizontal
621: A large (main) pane is shown at the top of the window and the remaining panes are
1.6 jmc 622: spread from left to right in the leftover space at the bottom.
1.2 nicm 623: Use the
624: .Em main-pane-height
625: window option to specify the height of the top pane.
1.1 nicm 626: .It Ic main-vertical
1.2 nicm 627: Similar to
628: .Ic main-horizontal
629: but the large pane is placed on the left and the others spread from top to
630: bottom along the right.
631: See the
632: .Em main-pane-width
633: window option.
1.1 nicm 634: .El
1.8 nicm 635: .Pp
1.57 jmc 636: Commands related to windows and panes are as follows:
637: .Bl -tag -width Ds
638: .It Xo Ic break-pane
639: .Op Fl d
640: .Op Fl t Ar target-pane
641: .Xc
642: .D1 (alias: Ic breakp )
643: Break
644: .Ar target-pane
645: off from its containing window to make it the only pane in a new window.
646: If
647: .Fl d
648: is given, the new window does not become the current window.
1.76 nicm 649: .It Xo
650: .Ic choose-client
651: .Op Fl t Ar target-window
652: .Op Ar template
653: .Xc
654: Put a window into client choice mode, allowing a client to be selected
655: interactively from a list.
656: After a client is chosen,
657: .Ql %%
658: is replaced by the client
659: .Xr pty 4
660: path in
661: .Ar template
662: and the result executed as a command.
663: If
664: .Ar template
665: is not given, "detach-client -t '%%'" is used.
1.57 jmc 666: This command works only from inside
667: .Nm .
1.76 nicm 668: .It Xo
669: .Ic choose-session
670: .Op Fl t Ar target-window
671: .Op Ar template
672: .Xc
673: Put a window into session choice mode, where a session may be selected
674: interactively from a list.
675: When one is chosen,
676: .Ql %%
677: is replaced by the session name in
678: .Ar template
679: and the result executed as a command.
680: If
681: .Ar template
682: is not given, "switch-client -t '%%'" is used.
683: This command works only from inside
684: .Nm .
685: .It Xo
686: .Ic choose-window
687: .Op Fl t Ar target-window
688: .Op Ar template
689: .Xc
690: Put a window into window choice mode, where a window may be chosen
691: interactively from a list.
692: After a window is selected,
693: .Ql %%
694: is replaced by the session name and window index in
695: .Ar template
696: and the result executed as a command.
697: If
698: .Ar template
699: is not given, "select-window -t '%%'" is used.
1.57 jmc 700: This command works only from inside
701: .Nm .
1.78 nicm 702: .It Ic display-panes Op Fl t Ar target-client
703: .D1 (alias: Ic displayp)
704: Display a visible indicator of each pane shown by
705: .Ar target-client .
706: See the
707: .Ic display-panes-time
708: and
709: .Ic display-panes-colour
710: session options.
1.84 nicm 711: While the indicator is on screen, a pane may be selected with the
712: .Ql 0
713: to
714: .Ql 9
715: keys.
1.57 jmc 716: .It Ic down-pane Op Fl t Ar target-pane
717: .D1 (alias: Ic downp )
718: Move down a pane.
719: .It Xo Ic find-window
720: .Op Fl t Ar target-window
721: .Ar match-string
722: .Xc
723: .D1 (alias: Ic findw )
724: Search for the
725: .Xr fnmatch 3
726: pattern
727: .Ar match-string
728: in window names, titles, and visible content (but not history).
729: If only one window is matched, it'll be automatically selected, otherwise a
730: choice list is shown.
731: This command only works from inside
1.1 nicm 732: .Nm .
1.57 jmc 733: .It Ic kill-pane Op Fl t Ar target-pane
734: .D1 (alias: Ic killp )
735: Destroy the given pane.
736: If no panes remain in the containing window, it is also destroyed.
737: .It Ic kill-window Op Fl t Ar target-window
738: .D1 (alias: Ic killw )
739: Kill the current window or the window at
740: .Ar target-window ,
1.1 nicm 741: removing it from any sessions to which it is linked.
1.56 jmc 742: .It Ic last-window Op Fl t Ar target-session
1.1 nicm 743: .D1 (alias: Ic last )
744: Select the last (previously selected) window.
745: If no
746: .Ar target-session
747: is specified, select the last window of the current session.
748: .It Xo Ic link-window
749: .Op Fl dk
750: .Op Fl s Ar src-window
751: .Op Fl t Ar dst-window
752: .Xc
753: .D1 (alias: Ic linkw )
754: Link the window at
755: .Ar src-window
756: to the specified
757: .Ar dst-window .
758: If
759: .Ar dst-window
760: is specified and no such window exists, the
761: .Ar src-window
762: is linked there.
763: If
764: .Fl k
765: is given and
766: .Ar dst-window
767: exists, it is killed, otherwise an error is generated.
768: If
769: .Fl d
770: is given, the newly linked window is not selected.
1.56 jmc 771: .It Ic list-windows Op Fl t Ar target-session
1.1 nicm 772: .D1 (alias: Ic lsw )
773: List windows in the current session or in
774: .Ar target-session .
775: .It Xo Ic move-window
776: .Op Fl d
777: .Op Fl s Ar src-window
778: .Op Fl t Ar dst-window
779: .Xc
780: .D1 (alias: Ic movew )
781: This is similar to
782: .Ic link-window ,
783: except the window at
784: .Ar src-window
785: is moved to
786: .Ar dst-window .
787: .It Xo Ic new-window
1.28 nicm 788: .Op Fl dk
1.1 nicm 789: .Op Fl n Ar window-name
790: .Op Fl t Ar target-window
791: .Op Ar command
792: .Xc
793: .D1 (alias: Ic neww )
794: Create a new window.
795: If
796: .Fl d
797: is given, the session does not make the new window the current window.
798: .Ar target-window
1.28 nicm 799: represents the window to be created; if the target already exists an error is
800: shown, unless the
801: .Fl k
802: flag is used, in which case it is destroyed.
1.1 nicm 803: .Ar command
804: is the command to execute.
805: If
806: .Ar command
807: is not specified, the default command is used.
808: .Pp
809: The
810: .Ev TERM
811: environment variable must be set to
812: .Dq screen
813: for all programs running
814: .Em inside
815: .Nm .
816: New windows will automatically have
817: .Dq TERM=screen
818: added to their environment, but care must be taken not to reset this in shell
819: start-up files.
1.56 jmc 820: .It Ic next-layout Op Fl t Ar target-window
1.1 nicm 821: .D1 (alias: Ic nextl )
822: Move a window to the next layout and rearrange the panes to fit.
823: .It Xo Ic next-window
1.9 nicm 824: .Op Fl a
1.1 nicm 825: .Op Fl t Ar target-session
826: .Xc
827: .D1 (alias: Ic next )
828: Move to the next window in the session.
1.9 nicm 829: If
1.12 jmc 830: .Fl a
1.9 nicm 831: is used, move to the next window with a bell, activity or content alert.
1.1 nicm 832: .It Xo Ic previous-window
1.9 nicm 833: .Op Fl a
1.1 nicm 834: .Op Fl t Ar target-session
835: .Xc
836: .D1 (alias: Ic prev )
837: Move to the previous window in the session.
1.9 nicm 838: With
839: .Fl a ,
840: move to the previous window with a bell, activity or content alert.
1.1 nicm 841: .It Xo Ic rename-window
842: .Op Fl t Ar target-window
843: .Ar new-name
844: .Xc
845: .D1 (alias: Ic renamew )
846: Rename the current window, or the window at
847: .Ar target-window
848: if specified, to
849: .Ar new-name .
850: .It Xo Ic resize-pane
1.39 jmc 851: .Op Fl DLRU
1.52 nicm 852: .Op Fl t Ar target-pane
1.1 nicm 853: .Op Ar adjustment
854: .Xc
855: .D1 (alias: Ic resizep )
1.57 jmc 856: Resize a pane, upward with
857: .Fl U
858: (the default), downward with
859: .Fl D ,
860: to the left with
861: .Fl L
862: and to the right with
863: .Fl R .
864: The
865: .Ar adjustment
866: is given in lines or cells (the default is 1).
867: .It Xo Ic respawn-window
868: .Op Fl k
869: .Op Fl t Ar target-window
870: .Op Ar command
871: .Xc
872: .D1 (alias: Ic respawnw )
873: Reactive a window in which the command has exited (see the
874: .Ic remain-on-exit
875: window option).
876: If
877: .Ar command
878: is not given, the command used when the window was created is executed.
879: The window must be already inactive, unless
880: .Fl k
881: is given, in which case any existing command is killed.
882: .It Xo Ic rotate-window
883: .Op Fl DU
884: .Op Fl t Ar target-window
885: .Xc
886: .D1 (alias: Ic rotatew )
887: Rotate the positions of the panes within a window, either upward (numerically
888: lower) with
889: .Fl U
890: or downward (numerically higher).
891: .It Xo Ic select-layout
892: .Op Fl t Ar target-window
893: .Op Ar layout-name
894: .Xc
895: .D1 (alias: selectl )
896: Choose a specific layout for a window.
897: If
898: .Ar layout-name
899: is not given, the last layout used (if any) is reapplied.
900: .It Ic select-pane Op Fl t Ar target-pane
901: .D1 (alias: Ic selectp )
902: Make pane
903: .Ar target-pane
904: the active pane in window
905: .Ar target-window .
906: .It Ic select-window Op Fl t Ar target-window
907: .D1 (alias: Ic selectw )
908: Select the window at
909: .Ar target-window .
910: .It Xo Ic split-window
911: .Op Fl dhv
912: .Oo Fl l
913: .Ar size |
914: .Fl p Ar percentage Oc
915: .Op Fl t Ar target-window
916: .Op Ar command
917: .Xc
918: .D1 (alias: splitw )
919: Creates a new pane by splitting the active pane:
920: .Fl h
921: does a horizontal split and
922: .Fl v
923: a vertical split; if neither is specified,
924: .Fl v
925: is assumed.
926: The
927: .Fl l
928: and
929: .Fl p
930: options specify the size of the new window in lines (for vertical split) or in
931: cells (for horizontal split), or as a percentage, respectively.
932: All other options have the same meaning as in the
933: .Ic new-window
934: command.
935: .It Xo Ic swap-pane
936: .Op Fl dDU
937: .Op Fl s Ar src-pane
938: .Op Fl t Ar dst-pane
939: .Xc
940: .D1 (alias: Ic swapp )
941: Swap two panes.
942: If
943: .Fl U
944: is used and no source pane is specified with
945: .Fl s ,
946: .Ar dst-pane
947: is swapped with the previous pane (before it numerically);
948: .Fl D
949: swaps with the next pane (after it numerically).
950: .It Xo Ic swap-window
951: .Op Fl d
952: .Op Fl s Ar src-window
953: .Op Fl t Ar dst-window
954: .Xc
955: .D1 (alias: Ic swapw )
956: This is similar to
957: .Ic link-window ,
958: except the source and destination windows are swapped.
959: It is an error if no window exists at
960: .Ar src-window .
961: .It Xo Ic unlink-window
1.1 nicm 962: .Op Fl k
963: .Op Fl t Ar target-window
964: .Xc
1.57 jmc 965: .D1 (alias: Ic unlinkw )
966: Unlink
967: .Ar target-window .
968: Unless
969: .Fl k
970: is given, a window may be unlinked only if it is linked to multiple sessions -
971: windows may not be linked to no sessions;
972: if
1.1 nicm 973: .Fl k
1.57 jmc 974: is specified and the window is linked to only one session, it is unlinked and
975: destroyed.
976: .It Ic up-pane Op Fl t Ar target-pane
977: .D1 (alias: Ic upp )
978: Move up a pane.
979: .El
980: .Sh KEY BINDINGS
1.93 nicm 981: .Nm
982: allows a command to be bound to most keys, with or without a prefix key.
983: When specifying keys, most represent themselves (for example
984: .Ql A
985: to
986: .Ql Z
987: ).
988: Ctrl keys may be prefixed with
989: .Ql C-
990: or
991: .Ql ^
992: , and Alt (meta) with
993: .Ql M- .
994: In addition, the following special key names are accepted:
995: .Em BSpace ,
996: .Em BTab ,
997: .Em DC
998: (Delete),
999: .Em End ,
1000: .Em Enter ,
1001: .Em Escape ,
1002: .Em F1
1003: to
1004: .Em F20 ,
1005: .Em Home ,
1006: .Em IC
1007: (Insert),
1008: .Em NPage
1009: (Page Up),
1010: .Em PPage
1011: (Page Down),
1012: .Em Space ,
1013: and
1014: .Em Tab .
1015: Note that to bind the
1016: .Ql \&"
1017: or
1018: .Ql '
1019: keys, quotation marks are necessary, for example:
1020: .Bd -literal -offset indent
1021: bind-key '"' split-window
1022: bind-key "'" select-prompt
1023: .Ed
1024: .Pp
1.57 jmc 1025: Commands related to key bindings are as follows:
1026: .Bl -tag -width Ds
1027: .It Xo Ic bind-key
1028: .Op Fl cnr
1029: .Op Fl t Ar key-table
1030: .Ar key Ar command Op Ar arguments
1.1 nicm 1031: .Xc
1.57 jmc 1032: .D1 (alias: Ic bind )
1033: Bind key
1034: .Ar key
1035: to
1036: .Ar command .
1037: By default (without
1038: .Fl t )
1039: the primary key bindings are modified (those normally activated with the prefix
1040: key); in this case, if
1041: .Fl n
1042: is specified, it is not necessary to use the prefix key,
1043: .Ar command
1044: is bound to
1045: .Ar key
1046: alone.
1.1 nicm 1047: The
1.57 jmc 1048: .Fl r
1049: flag indicates this key may repeat, see the
1050: .Ic repeat-time
1051: option.
1052: .Pp
1053: If
1054: .Fl t
1055: is present,
1056: .Ar key
1057: is bound in
1058: .Ar key-table :
1059: the binding for command mode with
1060: .Fl c
1061: or for normal mode without.
1062: To view the default bindings and possible commands, see the
1063: .Ic list-keys
1064: command.
1065: .It Ic list-keys Op Fl t Ar key-table
1066: .D1 (alias: Ic lsk )
1067: List all key bindings.
1068: Without
1069: .Fl t
1070: the primary key bindings - those executed when preceded by the prefix key -
1071: are printed.
1072: Keys bound without the prefix key (see
1073: .Ic bind-key
1074: .Fl n )
1075: are enclosed in square brackets.
1076: .Pp
1077: With
1078: .Fl t ,
1079: the key bindings in
1080: .Ar key-table
1081: are listed; this may be one of:
1082: .Em vi-edit ,
1083: .Em emacs-edit ,
1084: .Em vi-choice ,
1085: .Em emacs-choice ,
1086: .Em vi-copy
1087: or
1088: .Em emacs-copy .
1089: .It Xo Ic send-keys
1.72 nicm 1090: .Op Fl t Ar target-pane
1.57 jmc 1091: .Ar key Ar ...
1.1 nicm 1092: .Xc
1.57 jmc 1093: .D1 (alias: Ic send )
1094: Send a key or keys to a window.
1095: Each argument
1096: .Ar key
1097: is the name of the key (such as
1098: .Ql C-a
1099: or
1100: .Ql npage
1101: ) to send; if the string is not recognised as a key, it is sent as a series of
1102: characters.
1103: All arguments are sent sequentially from first to last.
1.72 nicm 1104: .It Ic send-prefix Op Fl t Ar target-pane
1.57 jmc 1105: Send the prefix key to a window as if it was pressed.
1.89 nicm 1106: If multiple prefix keys are configured, only the first is sent.
1.57 jmc 1107: .It Xo Ic unbind-key
1108: .Op Fl cn
1109: .Op Fl t Ar key-table
1110: .Ar key
1.2 nicm 1111: .Xc
1.57 jmc 1112: .D1 (alias: Ic unbind )
1113: Unbind the command bound to
1114: .Ar key .
1115: Without
1116: .Fl t
1117: the primary key bindings are modified; in this case, if
1118: .Fl n
1119: is specified, the command bound to
1120: .Ar key
1121: without a prefix (if any) is removed.
1122: .Pp
1.47 nicm 1123: If
1.57 jmc 1124: .Fl t
1125: is present,
1126: .Ar key
1127: in
1128: .Ar key-table
1129: is unbound: the binding for command mode with
1130: .Fl c
1131: or for normal mode without.
1132: .El
1133: .Sh OPTIONS
1134: The appearance and behaviour of
1135: .Nm
1136: may be modified by changing the value of various options.
1137: There are two types of option:
1138: .Em session options
1139: and
1140: .Em window options .
1141: .Pp
1142: Each individual session may have a set of session options, and there is a
1143: separate set of global session options.
1144: Sessions which do not have a particular option configured inherit the value
1145: from the global session options.
1146: Session options are set or unset with the
1147: .Ic set-option
1148: command and may be listed with the
1149: .Ic show-options
1150: command.
1151: The available session options are listed under the
1152: .Ic set-option
1153: command.
1154: .Pp
1155: Similarly, a set of window options is attached to each window, and there is
1156: a set of global window options from which any unset options are inherited.
1157: Window options are altered with the
1158: .Ic set-window-option
1159: command and can be listed with the
1160: .Ic show-window-options
1161: command.
1162: All window options are documented with the
1163: .Ic set-window-option
1164: command.
1165: .Pp
1166: Commands which set options are as follows:
1167: .Bl -tag -width Ds
1.1 nicm 1168: .It Xo Ic set-option
1.58 nicm 1169: .Op Fl agu
1.1 nicm 1170: .Op Fl t Ar target-session
1171: .Ar option Ar value
1172: .Xc
1173: .D1 (alias: Ic set )
1.18 nicm 1174: Set a session option.
1.58 nicm 1175: With
1176: .Fl a ,
1177: and if the option expects a string,
1178: .Ar value
1179: is appended to the existing setting.
1.1 nicm 1180: If
1181: .Fl g
1.18 nicm 1182: is specified, the global session option is set.
1.1 nicm 1183: The
1184: .Fl u
1185: flag unsets an option, so a session inherits the option from the global
1186: options - it is not possible to unset a global option.
1187: .Pp
1.18 nicm 1188: Available session options are:
1.1 nicm 1189: .Bl -tag -width Ds
1.69 nicm 1190: .It Ic base-index Ar index
1191: Set the base index from which an unused index should be searched when a new
1192: window is created.
1193: The default is zero.
1.1 nicm 1194: .It Xo Ic bell-action
1.56 jmc 1195: .Op Ic any | none | current
1.1 nicm 1196: .Xc
1197: Set action on window bell.
1198: .Ic any
1199: means a bell in any window linked to a session causes a bell in the current
1200: window of that session,
1201: .Ic none
1202: means all bells are ignored and
1203: .Ic current
1204: means only bell in windows other than the current window are ignored.
1205: .It Ic buffer-limit Ar number
1206: Set the number of buffers kept for each session; as new buffers are added to
1207: the top of the stack, old ones are removed from the bottom if necessary to
1208: maintain this maximum length.
1209: .It Ic default-command Ar command
1210: Set the command used for new windows (if not specified when the window is
1211: created) to
1.79 nicm 1212: .Ar command ,
1213: which may be any
1214: .Xr sh 1
1215: command.
1.19 nicm 1216: The default is an empty string, which instructs
1217: .Nm
1.79 nicm 1218: to create a login shell using the value of the
1219: .Ic default-shell
1220: option.
1221: .It Ic default-shell Ar path
1222: Specify the default shell.
1223: This is used as the login shell for new windows when the
1224: .Ic default-command
1225: option is set to empty, and must be the full path of the executable.
1226: When started
1227: .Nm
1228: tries to set a default value from the first suitable of the
1.19 nicm 1229: .Ev SHELL
1.79 nicm 1230: environment variable, the shell returned by
1231: .Xr getpwuid 3 ,
1232: or
1233: .Pa /bin/sh .
1234: This option should be configured when
1235: .Nm
1236: is used as a login shell.
1.1 nicm 1237: .It Ic default-path Ar path
1238: Set the default working directory for processes created from keys, or
1239: interactively from the prompt.
1240: The default is the current working directory when the server is started.
1.22 nicm 1241: .It Ic default-terminal Ar terminal
1242: Set the default terminal for new windows created in this session - the
1243: default value of the
1244: .Ev TERM
1245: environment variable.
1246: For
1247: .Nm
1248: to work correctly, this
1249: .Em must
1250: be set to
1251: .Ql screen
1252: or a derivative of it.
1.78 nicm 1253: .It Ic display-panes-colour Ar colour
1254: Set the colour used for the
1255: .Ic display-panes
1256: command.
1257: .It Ic display-panes-time Ar time
1258: Set the time in milliseconds for which the indicators shown by the
1259: .Ic display-panes
1260: command appear.
1.21 nicm 1261: .It Ic display-time Ar time
1.78 nicm 1262: Set the amount of time for which status line messages and other on-screen
1263: indicators are displayed.
1.21 nicm 1264: .Ar time
1265: is in milliseconds.
1.1 nicm 1266: .It Ic history-limit Ar lines
1267: Set the maximum number of lines held in window history.
1268: This setting applies only to new windows - existing window histories are not
1269: resized and retain the limit at the point they were created.
1270: .It Ic lock-after-time Ar number
1.90 nicm 1271: Lock the server (like the
1272: .Ic lock-server
1273: command) after
1.1 nicm 1274: .Ar number
1275: seconds of inactivity.
1276: The default is off (set to 0).
1277: This has no effect as a session option; it must be set as a global option using
1278: .Fl g .
1.90 nicm 1279: .It Ic lock-command Ar command
1280: Command to run when locking each client.
1281: The default is to run
1282: .Xr lock 1
1283: with
1284: .Fl np .
1.1 nicm 1285: .It Ic message-attr Ar attributes
1286: Set status line message attributes, where
1287: .Ar attributes
1288: is either
1289: .Ic default
1290: or a comma-delimited list of one or more of:
1291: .Ic bright
1292: (or
1293: .Ic bold ) ,
1294: .Ic dim ,
1295: .Ic underscore ,
1296: .Ic blink ,
1297: .Ic reverse ,
1298: .Ic hidden ,
1299: or
1300: .Ic italics .
1301: .It Ic message-bg Ar colour
1302: Set status line message background colour, where
1303: .Ar colour
1304: is one of:
1305: .Ic black ,
1306: .Ic red ,
1307: .Ic green ,
1308: .Ic yellow ,
1309: .Ic blue ,
1310: .Ic magenta ,
1311: .Ic cyan ,
1.85 nicm 1312: .Ic white ,
1313: .Ic colour0
1314: to
1315: .Ic colour255
1316: from the 256-colour palette, or
1.1 nicm 1317: .Ic default .
1318: .It Ic message-fg Ar colour
1319: Set status line message foreground colour.
1.89 nicm 1320: .It Ic prefix Ar keys
1321: Set the keys accepted as a prefix key.
1322: .Ar keys
1323: is a comma-separated list of key names, each of which individually behave as
1324: the prefix key.
1.21 nicm 1325: .It Ic repeat-time Ar time
1.1 nicm 1326: Allow multiple commands to be entered without pressing the prefix-key again
1327: in the specified
1.21 nicm 1328: .Ar time
1.1 nicm 1329: milliseconds (the default is 500).
1330: Whether a key repeats may be set when it is bound using the
1331: .Fl r
1332: flag to
1333: .Ic bind-key .
1.52 nicm 1334: Repeat is enabled for the default keys bound to the
1335: .Ic resize-pane
1336: command.
1.1 nicm 1337: .It Xo Ic set-remain-on-exit
1.56 jmc 1338: .Op Ic on | off
1.1 nicm 1339: .Xc
1340: Set the
1341: .Ic remain-on-exit
1342: window option for any windows first created in this session.
1343: .It Xo Ic set-titles
1.56 jmc 1344: .Op Ic on | off
1.1 nicm 1345: .Xc
1.77 stsp 1346: Attempt to set the window title using the \ee]2;...\e007 xterm code if
1.1 nicm 1347: the terminal appears to be an xterm.
1.11 nicm 1348: This option is off by default.
1.6 jmc 1349: Note that elinks
1.1 nicm 1350: will only attempt to set the window title if the STY environment
1351: variable is set.
1.86 nicm 1352: .It Ic set-titles-string Ar string
1353: String used to set the window title if
1354: .Ic set-titles
1355: is on.
1356: Character sequences are replaced as for the
1357: .Ic status-left
1358: option.
1.1 nicm 1359: .It Xo Ic status
1.56 jmc 1360: .Op Ic on | off
1.1 nicm 1361: .Xc
1362: Show or hide the status line.
1363: .It Ic status-attr Ar attributes
1364: Set status line attributes.
1365: .It Ic status-bg Ar colour
1366: Set status line background colour.
1367: .It Ic status-fg Ar colour
1368: Set status line foreground colour.
1369: .It Ic status-interval Ar interval
1370: Update the status bar every
1371: .Ar interval
1372: seconds.
1373: By default, updates will occur every 15 seconds.
1374: A setting of zero disables redrawing at interval.
1.41 nicm 1375: .It Xo Ic status-justify
1.56 jmc 1376: .Op Ic left | centre | right
1.41 nicm 1377: .Xc
1378: Set the position of the window list component of the status line: left, centre
1379: or right justified.
1.1 nicm 1380: .It Xo Ic status-keys
1.56 jmc 1381: .Op Ic vi | emacs
1.1 nicm 1382: .Xc
1.6 jmc 1383: Use vi or emacs-style
1.1 nicm 1384: key bindings in the status line, for example at the command prompt.
1385: Defaults to emacs.
1386: .It Ic status-left Ar string
1387: Display
1388: .Ar string
1389: to the left of the status bar.
1390: .Ar string
1391: will be passed through
1392: .Xr strftime 3
1393: before being used.
1394: By default, the session name is shown.
1395: .Ar string
1.83 nicm 1396: may contain any of the following special character sequences:
1.1 nicm 1397: .Bl -column "Character pair" "Replaced with" -offset indent
1398: .It Sy "Character pair" Ta Sy "Replaced with"
1399: .It Li "#(command)" Ta "First line of command's output"
1.83 nicm 1400: .It Li "#[attributes]" Ta "Colour or attribute change"
1.1 nicm 1401: .It Li "#H" Ta "Hostname of local host"
1.35 nicm 1402: .It Li "#I" Ta "Current window index"
1403: .It Li "#P" Ta "Current pane index"
1.1 nicm 1404: .It Li "#S" Ta "Session name"
1405: .It Li "#T" Ta "Current window title"
1.35 nicm 1406: .It Li "#W" Ta "Current window name"
1.1 nicm 1407: .It Li "##" Ta "A literal" Ql #
1408: .El
1.83 nicm 1409: .Pp
1410: The #(command) form executes
1411: .Ql command
1412: as a shell command and inserts the first line of its output.
1413: #[attributes] allows a comma-separated list of attributes to be specified,
1414: these may be
1415: .Ql fg=colour
1416: to set the foreground colour,
1417: .Ql bg=colour
1418: to set the background colour, or one of the attributes described under the
1419: .Ic message-attr
1420: option.
1421: Examples are:
1422: .Bd -literal -offset indent
1423: #(sysctl vm.loadavg)
1424: #[fg=yellow,bold]#(apm -l)%%#[default] [#S]
1425: .Ed
1.1 nicm 1426: .Pp
1427: Where appropriate, these may be prefixed with a number to specify the maximum
1428: length, for example
1429: .Ql #24T .
1.10 nicm 1430: .Pp
1.12 jmc 1431: By default, UTF-8 in
1.10 nicm 1432: .Ar string
1433: is not interpreted, to enable UTF-8, use the
1434: .Ic status-utf8
1435: option.
1.62 nicm 1436: .It Ic status-left-attr Ar attributes
1.66 jmc 1437: Set the attribute of the left part of the status line.
1.62 nicm 1438: .It Ic status-left-fg Ar colour
1439: Set the foreground colour of the left part of the status line.
1440: .It Ic status-left-bg Ar colour
1441: Set the background colour of the left part of the status line.
1.1 nicm 1442: .It Ic status-left-length Ar length
1443: Set the maximum
1444: .Ar length
1445: of the left component of the status bar.
1446: The default is 10.
1447: .It Ic status-right Ar string
1448: Display
1449: .Ar string
1450: to the right of the status bar.
1451: By default, the date and time will be shown.
1452: As with
1453: .Ic status-left ,
1454: .Ar string
1455: will be passed to
1.10 nicm 1456: .Xr strftime 3 ,
1457: character pairs are replaced, and UTF-8 is dependent on the
1458: .Ic status-utf8
1459: option.
1.62 nicm 1460: .It Ic status-right-attr Ar attributes
1.66 jmc 1461: Set the attribute of the right part of the status line.
1.62 nicm 1462: .It Ic status-right-fg Ar colour
1463: Set the foreground colour of the right part of the status line.
1464: .It Ic status-right-bg Ar colour
1465: Set the background colour of the right part of the status line.
1.1 nicm 1466: .It Ic status-right-length Ar length
1467: Set the maximum
1468: .Ar length
1469: of the right component of the status bar.
1470: The default is 40.
1.10 nicm 1471: .Pp
1472: .It Xo Ic status-utf8
1.56 jmc 1473: .Op Ic on | off
1.10 nicm 1474: .Xc
1475: Instruct
1476: .Nm
1477: to treat top-bit-set characters in the
1478: .Ic status-left
1479: and
1480: .Ic status-right
1481: strings as UTF-8; notably, this is important for wide characters.
1482: This option defaults to off.
1.55 jmc 1483: .It Ic terminal-overrides Ar string
1.54 nicm 1484: Contains a list of entries which override terminal descriptions read using
1485: .Xr terminfo 5 .
1486: .Ar string
1487: is a comma-separated list of items each a colon-separated string made up of a
1488: terminal type pattern (matched using
1489: .Xr fnmatch 3 )
1490: and a set of
1491: .Em name=value
1492: entries.
1493: .Pp
1494: For example, to set the
1495: .Ql clear
1496: .Xr terminfo 5
1497: entry to
1498: .Ql \ee[H\ee[2J
1499: for all terminal types and the
1500: .Ql dch1
1501: entry to
1502: .Ql \ee[P
1.55 jmc 1503: for the
1.54 nicm 1504: .Ql rxvt
1505: terminal type, the option could be set to the string:
1506: .Bd -literal -offset indent
1507: "*:clear=\ee[H\ee[2J,rxvt:dch1=\ee[P"
1508: .Ed
1509: .Pp
1510: The terminal entry value is passed through
1511: .Xr strunvis 3
1512: before interpretation.
1513: The default value forcibly corrects the
1514: .Ql colors
1515: entry for terminals which support 88 or 256 colours:
1516: .Bd -literal -offset indent
1517: "*88col*:colors=88,*256col*:colors=256"
1518: .Ed
1.63 nicm 1519: .It Ic update-environment Ar variables
1520: Set a space-separated string containing a list of environment variables to be
1521: copied into the session environment when a new session is created or an
1522: existing session is attached.
1523: Any variables that do not exist in the source environment are set to be
1524: removed from the session environment (as if
1525: .Fl r
1526: was given to the
1527: .Ic set-environment
1528: command).
1529: The default is
1.75 nicm 1530: "DISPLAY WINDOWID SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION".
1.37 nicm 1531: .It Xo Ic visual-activity
1.56 jmc 1532: .Op Ic on | off
1.37 nicm 1533: .Xc
1534: If on, display a status line message when activity occurs in a window
1.39 jmc 1535: for which the
1.37 nicm 1536: .Ic monitor-activity
1537: window option is enabled.
1538: .It Xo Ic visual-bell
1.56 jmc 1539: .Op Ic on | off
1.37 nicm 1540: .Xc
1541: If this option is on, a message is shown on a bell instead of it being passed
1542: through to the terminal (which normally makes a sound).
1543: Also see the
1544: .Ic bell-action
1545: option.
1546: .It Xo Ic visual-content
1.56 jmc 1547: .Op Ic on | off
1.37 nicm 1548: .Xc
1549: Like
1550: .Ic visual-activity ,
1551: display a message when content is present in a window
1.39 jmc 1552: for which the
1.37 nicm 1553: .Ic monitor-content
1554: window option is enabled.
1.1 nicm 1555: .El
1556: .It Xo Ic set-window-option
1.58 nicm 1557: .Op Fl agu
1.1 nicm 1558: .Op Fl t Ar target-window
1559: .Ar option Ar value
1560: .Xc
1561: .D1 (alias: Ic setw )
1.18 nicm 1562: Set a window option.
1.1 nicm 1563: The
1.58 nicm 1564: .Fl a ,
1.1 nicm 1565: .Fl g
1566: and
1567: .Fl u
1568: flags work similarly to the
1569: .Ic set-option
1570: command.
1571: .Pp
1.18 nicm 1572: Supported window options are:
1.56 jmc 1573: .Pp
1574: .Bl -tag -width Ds -compact
1.1 nicm 1575: .It Xo Ic aggressive-resize
1.56 jmc 1576: .Op Ic on | off
1.1 nicm 1577: .Xc
1578: Aggressively resize the chosen window.
1579: This means that
1580: .Nm
1581: will resize the window to the size of the smallest session for which it is the
1582: current window, rather than the smallest session to which it is attached.
1583: The window may resize when the current window is changed on another sessions;
1.6 jmc 1584: this option is good for full-screen programs which support
1585: .Dv SIGWINCH
1586: and poor for interactive programs such as shells.
1.56 jmc 1587: .Pp
1.1 nicm 1588: .It Xo Ic automatic-rename
1.56 jmc 1589: .Op Ic on | off
1.1 nicm 1590: .Xc
1591: Control automatic window renaming.
1592: When this setting is enabled,
1593: .Nm
1594: will attempt - on supported platforms - to rename the window to reflect the
1595: command currently running in it.
1596: This flag is automatically disabled for an individual window when a name
1597: is specified at creation with
1598: .Ic new-window or
1599: .Ic new-session ,
1600: or later with
1601: .Ic rename-window .
1602: It may be switched off globally with:
1603: .Bd -literal -offset indent
1604: set-window-option -g automatic-rename off
1605: .Ed
1.56 jmc 1606: .Pp
1.1 nicm 1607: .It Ic clock-mode-colour Ar colour
1608: Set clock colour.
1.56 jmc 1609: .Pp
1.1 nicm 1610: .It Xo Ic clock-mode-style
1.56 jmc 1611: .Op Ic 12 | 24
1.1 nicm 1612: .Xc
1613: Set clock hour format.
1.56 jmc 1614: .Pp
1.1 nicm 1615: .It Ic force-height Ar height
1616: .It Ic force-width Ar width
1617: Prevent
1618: .Nm
1619: from resizing a window to greater than
1620: .Ar width
1621: or
1622: .Ar height .
1623: A value of zero restores the default unlimited setting.
1.56 jmc 1624: .Pp
1.2 nicm 1625: .It Ic main-pane-width Ar width
1626: .It Ic main-pane-height Ar height
1627: Set the width or height of the main (left or top) pane in the
1628: .Ic main-horizontal
1629: or
1630: .Ic main-vertical
1631: layouts.
1.56 jmc 1632: .Pp
1.1 nicm 1633: .It Ic mode-attr Ar attributes
1634: Set window modes attributes.
1.56 jmc 1635: .Pp
1.1 nicm 1636: .It Ic mode-bg Ar colour
1637: Set window modes background colour.
1.56 jmc 1638: .Pp
1.1 nicm 1639: .It Ic mode-fg Ar colour
1640: Set window modes foreground colour.
1.56 jmc 1641: .Pp
1.1 nicm 1642: .It Xo Ic mode-keys
1.56 jmc 1643: .Op Ic vi | emacs
1.1 nicm 1644: .Xc
1.50 nicm 1645: Use vi or emacs-style key bindings in scroll, copy and choice modes.
1.1 nicm 1646: Key bindings default to emacs.
1.56 jmc 1647: .Pp
1.50 nicm 1648: .It Xo Ic mode-mouse
1.56 jmc 1649: .Op Ic on | off
1.50 nicm 1650: .Xc
1.51 jmc 1651: Mouse state in modes.
1652: If on,
1.50 nicm 1653: .Nm
1654: will respond to mouse clicks by moving the cursor in copy mode or selecting an
1655: option in choice mode.
1.56 jmc 1656: .Pp
1.1 nicm 1657: .It Xo Ic monitor-activity
1.56 jmc 1658: .Op Ic on | off
1.1 nicm 1659: .Xc
1660: Monitor for activity in the window.
1661: Windows with activity are highlighted in the status line.
1.56 jmc 1662: .Pp
1663: .It Ic monitor-content Ar match-string
1.6 jmc 1664: Monitor content in the window.
1665: When
1.16 nicm 1666: .Xr fnmatch 3
1667: pattern
1.1 nicm 1668: .Ar match-string
1669: appears in the window, it is highlighted in the status line.
1.56 jmc 1670: .Pp
1.1 nicm 1671: .It Xo Ic remain-on-exit
1.56 jmc 1672: .Op Ic on | off
1.1 nicm 1673: .Xc
1674: A window with this flag set is not destroyed when the program running in it
1675: exits.
1676: The window may be reactivated with the
1677: .Ic respawn-window
1678: command.
1.56 jmc 1679: .Pp
1.1 nicm 1680: .It Xo Ic utf8
1.56 jmc 1681: .Op Ic on | off
1.1 nicm 1682: .Xc
1683: Instructs
1684: .Nm
1685: to expect UTF-8 sequences to appear in this window.
1.56 jmc 1686: .Pp
1.1 nicm 1687: .It Ic window-status-attr Ar attributes
1688: Set status line attributes for a single window.
1.56 jmc 1689: .Pp
1.1 nicm 1690: .It Ic window-status-bg Ar colour
1691: Set status line background colour for a single window.
1.56 jmc 1692: .Pp
1.1 nicm 1693: .It Ic window-status-fg Ar colour
1694: Set status line foreground colour for a single window.
1.56 jmc 1695: .Pp
1.40 nicm 1696: .It Ic window-status-current-attr Ar attributes
1697: Set status line attributes for the currently active window.
1.56 jmc 1698: .Pp
1.40 nicm 1699: .It Ic window-status-current-bg Ar colour
1700: Set status line background colour for the currently active window.
1.56 jmc 1701: .Pp
1.40 nicm 1702: .It Ic window-status-current-fg Ar colour
1703: Set status line foreground colour for the currently active window.
1.56 jmc 1704: .Pp
1.1 nicm 1705: .It Xo Ic xterm-keys
1.56 jmc 1706: .Op Ic on | off
1.1 nicm 1707: .Xc
1708: If this option is set,
1709: .Nm
1710: will generate
1.57 jmc 1711: .Xr xterm 1 -style
1712: function key sequences; these have a number included to indicate modifiers such
1713: as Shift, Alt or Ctrl.
1714: .El
1715: .It Xo Ic show-options
1716: .Op Fl g
1717: .Op Fl t Ar target-session
1718: .Xc
1719: .D1 (alias: Ic show )
1720: Show the session options for
1721: .Ar target session ,
1722: or the global session options with
1723: .Fl g .
1724: .It Xo Ic show-window-options
1725: .Op Fl g
1726: .Op Fl t Ar target-window
1727: .Xc
1728: .D1 (alias: Ic showw )
1729: List the window options for
1730: .Ar target-window ,
1731: or the global window options if
1732: .Fl g
1733: is used.
1.63 nicm 1734: .El
1735: .Sh ENVIRONMENT
1736: When the server is started,
1737: .Nm
1738: copies the environment into the
1739: .Em global environment ;
1740: in addition, each session has a
1741: .Em session environment .
1742: When a window is created, the session and global environments are merged with
1743: the session environment overriding any variable present in both.
1744: This is the initial environment passed to the new process.
1745: .Pp
1746: The
1747: .Ic update-environment
1748: session option may be used to update the session environment from the client
1749: when a new session is created or an old reattached.
1750: .Nm
1751: also initialises the
1752: .Ev TMUX
1753: variable with some internal information to allow commands to be executed
1754: from inside, and the
1755: .Ev TERM
1756: variable with the correct terminal setting of
1757: .Ql screen .
1758: .Pp
1759: Commands to alter and view the environment are:
1760: .Bl -tag -width Ds
1761: .It Xo Ic set-environment
1762: .Op Fl gru
1763: .Op Fl t Ar target-session
1764: .Ar name Op Ar value
1765: .Xc
1766: Set or unset an environment variable.
1767: If
1768: .Fl g
1769: is used, the change is made in the global environment; otherwise, it is applied
1770: to the session environment for
1771: .Ar target-session .
1772: The
1773: .Fl u
1774: flag unsets a variable.
1775: .Fl r
1776: indicates the variable is to be removed from the environment before starting a
1777: new process.
1778: .It Xo Ic show-environment
1779: .Op Fl g
1780: .Op Fl t Ar target-session
1781: .Xc
1782: Display the environment for
1783: .Ar target-session
1784: or the global environment with
1785: .Fl g .
1786: Variables removed from the environment are prefixed with
1787: .Ql - .
1.57 jmc 1788: .El
1789: .Sh STATUS LINE
1790: .Nm
1791: includes an optional status line which is displayed in the bottom line of each
1792: terminal.
1793: By default, the status line is enabled (it may be disabled with the
1794: .Ic status
1795: session option) and contains, from left-to-right: the name of the current
1796: session in square brackets; the window list; the current window title in double
1797: quotes; and the time and date.
1798: .Pp
1799: The status line is made of three parts: configurable left and right sections
1800: (which may contain dynamic content such as the time or output from a shell
1801: command, see the
1802: .Ic status-left ,
1803: .Ic status-left-length ,
1804: .Ic status-right ,
1805: and
1806: .Ic status-right-length
1807: options below), and a central window list.
1808: The window list shows the index, name and (if any) flag of the windows
1809: present in the current session in ascending numerical order.
1810: The flag is one of the following symbols appended to the window name:
1811: .Bl -column "Symbol" "Meaning" -offset indent
1812: .It Sy "Symbol" Ta Sy "Meaning"
1813: .It Li "*" Ta "Denotes the current window."
1814: .It Li "-" Ta "Marks the last window (previously selected)."
1815: .It Li "#" Ta "Window is monitored and activity has been detected."
1816: .It Li "!" Ta "A bell has occurred in the window."
1817: .It Li "+" Ta "Window is monitored for content and it has appeared."
1818: .El
1819: .Pp
1820: The # symbol relates to the
1821: .Ic monitor-activity
1822: and + to the
1823: .Ic monitor-content
1824: window options.
1825: The window name is printed in inverted colours if an alert (bell, activity or
1826: content) is present.
1827: .Pp
1828: The colour and attributes of the status line may be configured, the entire status line using
1829: the
1830: .Ic status-attr ,
1831: .Ic status-fg
1832: and
1833: .Ic status-bg
1834: session options and individual windows using the
1835: .Ic window-status-attr ,
1836: .Ic window-status-fg
1837: and
1838: .Ic window-status-bg
1839: window options.
1840: .Pp
1841: The status line is automatically refreshed at interval if it has changed, the interval may be
1842: controlled with the
1843: .Ic status-interval
1844: session option.
1845: .Pp
1846: Commands related to the status line are as follows:
1847: .Bl -tag -width Ds
1848: .It Xo Ic command-prompt
1.73 nicm 1849: .Op Fl p Ar prompts
1.57 jmc 1850: .Op Fl t Ar target-client
1851: .Op Ar template
1852: .Xc
1853: Open the command prompt in a client.
1854: This may be used from inside
1855: .Nm
1856: to execute commands interactively.
1857: If
1858: .Ar template
1.73 nicm 1859: is specified, it is used as the command.
1860: If
1861: .Fl p
1862: is given,
1863: .Ar prompts
1864: is a comma-separated list of prompts which are displayed in order; otherwise
1865: a single prompt is displayed, constructed from
1866: .Ar template
1867: if it is present, or
1868: .Ql \&:
1869: if not.
1870: Before the command is executed, the first occurrence of the string
1871: .Ql %%
1.74 jmc 1872: and all occurrences of
1.73 nicm 1873: .Ql %1
1874: are replaced by the response to the first prompt, the second
1875: .Ql %%
1876: and all
1877: .Ql %2
1878: are replaced with the response to the second prompt, and so on for further
1.74 jmc 1879: prompts.
1880: Up to nine prompt responses may be replaced
1881: .Po
1882: .Ql %1
1.73 nicm 1883: to
1.74 jmc 1884: .Ql %9
1885: .Pc .
1.57 jmc 1886: .It Xo Ic confirm-before
1887: .Op Fl t Ar target-client
1888: .Ar command
1889: .Xc
1890: .D1 (alias: Ic confirm )
1891: Ask for confirmation before executing
1892: .Ar command .
1893: This command works only from inside
1894: .Nm .
1895: .It Xo Ic display-message
1896: .Op Fl t Ar target-client
1897: .Op Ar message
1898: .Xc
1899: .D1 (alias: Ic display )
1900: Display a message (see the
1901: .Ic status-left
1902: option below)
1903: in the status line.
1904: .It Ic select-prompt Op Fl t Ar target-client
1905: Open a prompt inside
1906: .Ar target-client
1907: allowing a window index to be entered interactively.
1908: .El
1909: .Sh BUFFERS
1910: .Nm
1911: maintains a stack of
1912: .Em paste buffers
1913: for each session.
1914: Up to the value of the
1915: .Ic buffer-limit
1916: option are kept; when a new buffer is added, the buffer at the bottom of the
1917: stack is removed.
1918: Buffers may be added using
1919: .Ic copy-mode
1920: or the
1921: .Ic set-buffer
1922: command, and pasted into a window using the
1923: .Ic paste-buffer
1924: command.
1925: .Pp
1926: A configurable history buffer is also maintained for each window.
1927: By default, up to 2000 lines are kept; this can be altered with the
1928: .Ic history-limit
1929: option (see the
1930: .Ic set-option
1931: command above).
1932: .Pp
1933: The buffer commands are as follows:
1934: .Bl -tag -width Ds
1935: .It Ic clear-history Op Fl t Ar target-pane
1936: .D1 (alias: Ic clearhist )
1937: Remove and free the history for the specified pane.
1938: .It Xo Ic copy-buffer
1939: .Op Fl a Ar src-index
1940: .Op Fl b Ar dst-index
1941: .Op Fl s Ar src-session
1942: .Op Fl t Ar dst-session
1943: .Xc
1944: .D1 (alias: Ic copyb )
1945: Copy a session paste buffer to another session.
1946: If no sessions are specified, the current one is used instead.
1947: .It Xo Ic delete-buffer
1948: .Op Fl b Ar buffer-index
1949: .Op Fl t Ar target-session
1950: .Xc
1951: .D1 (alias: Ic deleteb )
1952: Delete the buffer at
1953: .Ar buffer-index ,
1954: or the top buffer if not specified.
1955: .It Ic list-buffers Op Fl t Ar target-session
1956: .D1 (alias: Ic lsb )
1957: List the buffers in the given session.
1958: .It Xo Ic load-buffer
1959: .Op Fl b Ar buffer-index
1960: .Op Fl t Ar target-session
1961: .Ar path
1962: .Xc
1963: .D1 (alias: Ic loadb )
1964: Load the contents of the specified paste buffer from
1965: .Ar path .
1966: .It Xo Ic paste-buffer
1967: .Op Fl dr
1968: .Op Fl b Ar buffer-index
1969: .Op Fl t Ar target-window
1970: .Xc
1971: .D1 (alias: Ic pasteb )
1972: Insert the contents of a paste buffer into the current window.
1973: With
1974: .Fl d ,
1975: also delete the paste buffer from the stack.
1976: When output, any linefeed (LF) characters in the paste buffer are replaced with
1977: carriage returns (CR).
1978: This translation may be disabled with the
1979: .Fl r
1980: flag.
1981: .It Xo Ic save-buffer
1982: .Op Fl a
1983: .Op Fl b Ar buffer-index
1984: .Op Fl t Ar target-session
1985: .Ar path
1986: .Xc
1987: .D1 (alias: Ic saveb )
1988: Save the contents of the specified paste buffer to
1989: .Ar path .
1990: The
1991: .Fl a
1992: option appends to rather than overwriting the file.
1993: .It Xo Ic set-buffer
1994: .Op Fl b Ar buffer-index
1995: .Op Fl t Ar target-session
1996: .Ar data
1997: .Xc
1998: .D1 (alias: Ic setb )
1999: Set the contents of the specified buffer to
2000: .Ar data .
1.1 nicm 2001: .It Xo Ic show-buffer
2002: .Op Fl b Ar buffer-index
2003: .Op Fl t Ar target-session
2004: .Xc
2005: .D1 (alias: Ic showb )
2006: Display the contents of the specified buffer.
1.57 jmc 2007: .El
2008: .Sh MISCELLANEOUS
2009: .Pp
2010: Miscellaneous commands are as follows:
2011: .Bl -tag -width Ds
1.72 nicm 2012: .It Ic clock-mode Op Fl t Ar target-pane
1.57 jmc 2013: Display a large clock.
2014: .It Ic if-shell Ar shell-command command
2015: .D1 (alias: Ic if )
2016: Execute
2017: .Ar command
2018: if
2019: .Ar shell-command
2020: returns success.
2021: .It Ic lock-server
2022: .D1 (alias: Ic lock )
1.90 nicm 2023: Lock each client individually by running the command specified by the
2024: .Ic lock-command
2025: option.
1.87 nicm 2026: .It Ic run-shell Ar command
2027: .D1 (alias: Ic run )
2028: Execute
2029: .Ar command
2030: without creating a window.
2031: Any output to stdout is displayed in output mode.
2032: If
1.88 jmc 2033: .Ar command
1.87 nicm 2034: doesn't return success, the exit status is also displayed.
1.57 jmc 2035: .It Ic server-info
2036: .D1 (alias: Ic info )
2037: Show server information and terminal details.
1.1 nicm 2038: .El
2039: .Sh FILES
1.26 nicm 2040: .Bl -tag -width "/etc/tmux.confXXX" -compact
1.1 nicm 2041: .It Pa ~/.tmux.conf
1.6 jmc 2042: Default
1.1 nicm 2043: .Nm
1.6 jmc 2044: configuration file.
1.26 nicm 2045: .It Pa /etc/tmux.conf
2046: System-wide configuration file.
1.1 nicm 2047: .El
1.57 jmc 2048: .Sh EXAMPLES
2049: To create a new
2050: .Nm
2051: session running
2052: .Xr vi 1 :
2053: .Pp
2054: .Dl $ tmux new-session vi
2055: .Pp
2056: Most commands have a shorter form, known as an alias.
2057: For new-session, this is
2058: .Ic new :
2059: .Pp
2060: .Dl $ tmux new vi
2061: .Pp
2062: Alternatively, the shortest unambiguous form of a command is accepted.
2063: If there are several options, they are listed:
2064: .Bd -literal -offset indent
2065: $ tmux n
2066: ambiguous command: n, could be: new-session, new-window, next-window
2067: .Ed
2068: .Pp
2069: Within an active session, a new window may be created by typing
2070: .Ql C-b c
2071: (Ctrl
2072: followed by the
2073: .Ql b
2074: key
2075: followed by the
2076: .Ql c
2077: key).
2078: .Pp
2079: Windows may be navigated with:
2080: .Ql C-b 0
2081: (to select window 0),
2082: .Ql C-b 1
2083: (to select window 1), and so on;
2084: .Ql C-b n
2085: to select the next window; and
2086: .Ql C-b p
2087: to select the previous window.
2088: .Pp
2089: A session may be detached using
2090: .Ql C-b d
1.64 nicm 2091: (or by an external event such as
2092: .Xr ssh 1
2093: disconnection) and reattached with:
1.57 jmc 2094: .Pp
2095: .Dl $ tmux attach-session
2096: .Pp
2097: Typing
2098: .Ql C-b \&?
2099: lists the current key bindings in the current window; up and down may be used
2100: to navigate the list or
2101: .Ql q
2102: to exit from it.
2103: .Pp
2104: Commands to be run when the
2105: .Nm
2106: server is started may be placed in the
2107: .Pa ~/.tmux.conf
2108: configuration file.
2109: Common examples include:
2110: .Pp
2111: Changing the default prefix key:
2112: .Bd -literal -offset indent
2113: set-option -g prefix C-a
2114: unbind-key C-b
2115: bind-key C-a send-prefix
2116: .Ed
2117: .Pp
2118: Turning the status line off, or changing its colour:
2119: .Bd -literal -offset indent
2120: set-option -g status off
2121: set-option -g status-bg blue
2122: .Ed
2123: .Pp
2124: Setting other options, such as the default command,
2125: or locking after 30 minutes of inactivity:
2126: .Bd -literal -offset indent
2127: set-option -g default-command "exec /bin/ksh"
2128: set-option -g lock-after-time 1800
2129: .Ed
2130: .Pp
2131: Creating new key bindings:
2132: .Bd -literal -offset indent
2133: bind-key b set-option status
2134: bind-key / command-prompt "split-window 'exec man %%'"
1.73 nicm 2135: bind-key S command-prompt "new-window -n %1 'ssh %1'"
1.57 jmc 2136: .Ed
1.1 nicm 2137: .Sh SEE ALSO
2138: .Xr pty 4
2139: .Sh AUTHORS
2140: .An Nicholas Marriott Aq nicm@users.sourceforge.net