Accept (and document) "none" instead of "default" for attributes as it
[tmux-openbsd.git] / tmux.1
blob85aabdb7c29edad3ef5a2d24518c0cd4e4371985
1 .\" $OpenBSD$
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 .\"
17 .Dd $Mdocdate$
18 .Dt TMUX 1
19 .Os
20 .Sh NAME
21 .Nm tmux
22 .Nd terminal multiplexer
23 .Sh SYNOPSIS
24 .Nm tmux
25 .Bk -words
26 .Op Fl 28lquv
27 .Op Fl c Ar shell-command
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
35 is a terminal multiplexer:
36 it enables a number of terminals to be created, accessed, and
37 controlled from a single screen.
38 .Nm
39 may be detached from a screen
40 and continue running in the background,
41 then later reattached.
42 .Pp
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
74 Each session is persistent and will survive accidental disconnection
75 (such as
76 .Xr ssh 1
77 connection timeout) or intentional detaching (with the
78 .Ql C-b d
79 key strokes).
80 .Nm
81 may be reattached using:
82 .Pp
83 .Dl $ tmux attach
84 .Pp
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 .
94 .Pp
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 ,
104 but indicates that the terminal supports 88 colours.
105 .It Fl c Ar shell-command
106 Execute
107 .Ar shell-command
108 using the default shell.
109 If necessary, the
111 server will be started to retrieve the
112 .Ic default-shell
113 option.
114 This option is for compatibility with
115 .Xr sh 1
116 when
118 is used as a login shell.
119 .It Fl f Ar file
120 Specify an alternative configuration file.
121 By default,
123 loads the system configuration file from
124 .Pa /etc/tmux.conf ,
125 if present, then looks for a user configuration file at
126 .Pa ~/.tmux.conf .
127 The configuration file is a set of
129 commands which are executed in sequence when the server is first started.
131 If a command in the configuration file fails,
133 will report an error and exit without executing further commands.
134 .It Fl L Ar socket-name
136 stores the server socket in a directory under
137 .Pa /tmp ;
138 the default socket is named
139 .Em default .
140 This option allows a different socket name to be specified, allowing several
141 independent
143 servers to be run.
144 Unlike
145 .Fl S
146 a full path is not necessary: the sockets are all created in the same
147 directory.
149 If the socket is accidentally removed, the
150 .Dv SIGUSR1
151 signal may be sent to the
153 server process to recreate it.
154 .It Fl l
155 Behave as a login shell.
156 This flag currently has no effect and is for compatibility with other shells
157 when using tmux as a login shell.
158 .It Fl q
159 Set the
160 .Ic quiet
161 server option to prevent the server sending various informational messages.
162 .It Fl S Ar socket-path
163 Specify a full alternative path to the server socket.
165 .Fl S
166 is specified, the default socket directory is not used and any
167 .Fl L
168 flag is ignored.
169 .It Fl u
171 attempts to guess if the terminal is likely to support UTF-8 by checking the
172 first of the
173 .Ev LC_ALL ,
174 .Ev LC_CTYPE
176 .Ev LANG
177 environment variables to be set for the string "UTF-8".
178 This is not always correct: the
179 .Fl u
180 flag explicitly informs
182 that UTF-8 is supported.
184 If the server is started from a client passed
185 .Fl u
186 or where UTF-8 is detected, the
187 .Ic utf8
189 .Ic status-utf8
190 options are enabled in the global window and session options respectively.
191 .It Fl v
192 Request verbose logging.
193 This option may be specified multiple times for increasing verbosity.
194 Log messages will be saved into
195 .Pa tmux-client-PID.log
197 .Pa tmux-server-PID.log
198 files in the current directory, where
199 .Em PID
200 is the PID of the server or client process.
201 .It Ar command Op Ar flags
202 This specifies one of a set of commands used to control
203 .Nm ,
204 as described in the following sections.
205 If no commands are specified, the
206 .Ic new-session
207 command is assumed.
209 .Sh KEY BINDINGS
211 may be controlled from an attached client by using a key combination of a
212 prefix key,
213 .Ql C-b
214 (Ctrl-b) by default, followed by a command key.
216 Some of the default key bindings are:
218 .Bl -tag -width Ds -offset indent -compact
219 .It c
220 Create a new window.
221 .It d
222 Detach the current client.
223 .It l
224 Move to the previously selected window.
225 .It n
226 Change to the next window.
227 .It p
228 Change to the previous window.
229 .It &
230 Kill the current window.
231 .It ,
232 Rename the current window.
233 .It \&?
234 List all key bindings.
237 A complete list may be obtained with the
238 .Ic list-keys
239 command (bound to
240 .Ql \&?
241 by default).
242 Key bindings may be changed with the
243 .Ic bind-key
245 .Ic unbind-key
246 commands.
247 .Sh COMMANDS
248 This section contains a list of the commands supported by
249 .Nm .
250 Most commands accept the optional
251 .Fl t
252 argument with one of
253 .Ar target-client ,
254 .Ar target-session
255 .Ar target-window ,
257 .Ar target-pane .
258 These specify the client, session, window or pane which a command should affect.
259 .Ar target-client
260 is the name of the
261 .Xr pty 4
262 file to which the client is connected, for example either of
263 .Pa /dev/ttyp1
265 .Pa ttyp1
266 for the client attached to
267 .Pa /dev/ttyp1 .
268 If no client is specified, the current client is chosen, if possible, or an
269 error is reported.
270 Clients may be listed with the
271 .Ic list-clients
272 command.
274 .Ar target-session
275 is either the name of a session (as listed by the
276 .Ic list-sessions
277 command) or the name of a client with the same syntax as
278 .Ar target-client ,
279 in which case the session attached to the client is used.
280 When looking for the session name,
282 initially searches for an exact match; if none is found, the session names
283 are checked for any for which
284 .Ar target-session
285 is a prefix or for which it matches as an
286 .Xr fnmatch 3
287 pattern.
288 If a single match is found, it is used as the target session; multiple matches
289 produce an error.
290 If a session is omitted, the current session is used if available; if no
291 current session is available, the most recently used is chosen.
293 .Ar target-window
294 specifies a window in the form
295 .Em session Ns \&: Ns Em window .
296 .Em session
297 follows the same rules as for
298 .Ar target-session ,
300 .Em window
301 is looked for in order: as a window index, for example mysession:1; as an exact
302 window name, such as mysession:mywindow; then as an
303 .Xr fnmatch 3
304 pattern or the start of a window name, such as mysession:mywin* or
305 mysession:mywin.
306 An empty window name specifies the next unused index if appropriate (for
307 example the
308 .Ic new-window
310 .Ic link-window
311 commands)
312 otherwise the current window in
313 .Em session
314 is chosen.
315 The special character
316 .Ql \&!
317 uses the last (previously current) window, or
318 .Ql +
320 .Ql -
321 are the next window or the previous window by number.
322 When the argument does not contain a colon,
324 first attempts to parse it as window; if that fails, an attempt is made to
325 match a session.
327 .Ar target-pane
328 takes a similar form to
329 .Ar target-window
330 but with the optional addition of a period followed by a pane index, for
331 example: mysession:mywindow.1.
332 If the pane index is omitted, the currently active pane in the specified
333 window is used.
334 If neither a colon nor period appears,
336 first attempts to use the argument as a pane index; if that fails, it is looked
337 up as for
338 .Ar target-window .
340 .Ql +
342 .Ql -
343 indicate the next or previous pane index, respectively.
344 One of the strings
345 .Em top ,
346 .Em bottom ,
347 .Em left ,
348 .Em right ,
349 .Em top-left ,
350 .Em top-right ,
351 .Em bottom-left or
352 .Em bottom-right
353 may be used instead of a pane index.
355 .Ar shell-command
356 arguments are
357 .Xr sh 1
358 commands.
359 These must be passed as a single item, which typically means quoting them, for
360 example:
361 .Bd -literal -offset indent
362 new-window 'vi /etc/passwd'
365 .Ar command
366 .Op Ar arguments
367 refers to a
369 command, passed with the command and arguments separately, for example:
370 .Bd -literal -offset indent
371 bind-key F1 set-window-option force-width 81
374 Or if using
375 .Xr sh 1 :
376 .Bd -literal -offset indent
377 $ tmux bind-key F1 set-window-option force-width 81
380 Multiple commands may be specified together as part of a
381 .Em command sequence .
382 Each command should be separated by spaces and a semicolon;
383 commands are executed sequentially from left to right.
384 A literal semicolon may be included by escaping it with a backslash (for
385 example, when specifying a command sequence to
386 .Ic bind-key ) .
388 Example
390 commands include:
391 .Bd -literal -offset indent
392 refresh-client -t/dev/ttyp2
394 rename-session -tfirst newname
396 set-window-option -t:0 monitor-activity on
398 new-window ; split-window -d
401 Or from
402 .Xr sh 1 :
403 .Bd -literal -offset indent
404 $ tmux kill-window -t :1
406 $ tmux new-window \e; split-window -d
408 $ tmux new-session -d 'vi /etc/passwd' \e; split-window -d \e; attach
410 .Sh CLIENTS AND SESSIONS
413 server manages clients, sessions, windows and panes.
414 Clients are attached to sessions to interact with them, either
415 when they are created with the
416 .Ic new-session
417 command, or later with the
418 .Ic attach-session
419 command.
420 Each session has one of more windows
421 .Em linked
422 into it.
423 Windows may be linked to multiple sessions and are made up of one or
424 more panes,
425 each of which contains a pseudo terminal.
426 Commands for creating, linking and otherwise manipulating windows
427 are covered
428 in the
429 .Sx WINDOWS AND PANES
430 section.
432 The following commands are available to manage clients and sessions:
433 .Bl -tag -width Ds
434 .It Xo Ic attach-session
435 .Op Fl dr
436 .Op Fl t Ar target-session
438 .D1 (alias: Ic attach )
439 If run from outside
440 .Nm ,
441 create a new client in the current terminal and attach it to
442 .Ar target-session .
443 If used from inside, switch the current client.
445 .Fl d
446 is specified, any other clients attached to the session are detached.
447 .Fl r
448 signifies the client is read-only (only keys bound to the
449 .Ic detach-client
450 command have any effect)
452 If no server is started,
453 .Ic attach-session
454 will attempt to start it; this will fail unless sessions are created in the
455 configuration file.
456 .It Ic detach-client Op Fl t Ar target-client
457 .D1 (alias: Ic detach )
458 Detach the current client if bound to a key, or the specified client with
459 .Fl t .
460 .It Ic has-session Op Fl t Ar target-session
461 .D1 (alias: Ic has )
462 Report an error and exit with 1 if the specified session does not exist.
463 If it does exist, exit with 0.
464 .It Ic kill-server
465 Kill the
467 server and clients and destroy all sessions.
468 .It Ic kill-session Op Fl t Ar target-session
469 Destroy the given session, closing any windows linked to it and no other
470 sessions, and detaching all clients attached to it.
471 .It Ic list-clients
472 .D1 (alias: Ic lsc )
473 List all clients attached to the server.
474 .It Ic list-commands
475 .D1 (alias: Ic lscm )
476 List the syntax of all commands supported by
477 .Nm .
478 .It Ic list-sessions
479 .D1 (alias: Ic ls )
480 List all sessions managed by the server.
481 .It Xo Ic lock-client
482 .Op Fl t Ar target-client
484 Lock
485 .Ar target-client ,
486 see the
487 .Ic lock-server
488 command.
489 .It Xo Ic lock-session
490 .Op Fl t Ar target-session
492 Lock all clients attached to
493 .Ar target-session .
494 .It Xo Ic new-session
495 .Op Fl d
496 .Op Fl n Ar window-name
497 .Op Fl s Ar session-name
498 .Op Fl t Ar target-session
499 .Op Ar shell-command
501 .D1 (alias: Ic new )
502 Create a new session with name
503 .Ar session-name .
505 The new session is attached to the current terminal unless
506 .Fl d
507 is given.
508 .Ar window-name
510 .Ar shell-command
511 are the name of and shell command to execute in the initial window.
513 If run from a terminal, any
514 .Xr termios 4
515 special characters are saved and used for new windows in the new session.
518 .Fl t
519 is given, the new session is
520 .Em grouped
521 with
522 .Ar target-session .
523 This means they share the same set of windows - all windows from
524 .Ar target-session
525 are linked to the new session and any subsequent new windows or windows being
526 closed are applied to both sessions.
527 The current and previous window and any session options remain independent and
528 either session may be killed without affecting the other.
529 Giving
530 .Fl n
532 .Ar shell-command
533 are invalid if
534 .Fl t
535 is used.
536 .It Ic refresh-client Op Fl t Ar target-client
537 .D1 (alias: Ic refresh )
538 Refresh the current client if bound to a key, or a single client if one is given
539 with
540 .Fl t .
541 .It Xo Ic rename-session
542 .Op Fl t Ar target-session
543 .Ar new-name
545 .D1 (alias: Ic rename )
546 Rename the session to
547 .Ar new-name .
548 .It Xo Ic show-messages
549 .Op Fl t Ar target-client
551 .D1 (alias: Ic showmsgs )
552 Any messages displayed on the status line are saved in a per-client message
553 log, up to a maximum of the limit set by the
554 .Ar message-limit
555 session option for the session attached to that client.
556 This command displays the log for
557 .Ar target-client .
558 .It Ic source-file Ar path
559 .D1 (alias: Ic source )
560 Execute commands from
561 .Ar path .
562 .It Ic start-server
563 .D1 (alias: Ic start )
564 Start the
566 server, if not already running, without creating any sessions.
567 .It Xo Ic suspend-client
568 .Op Fl c Ar target-client
570 .D1 (alias: Ic suspendc )
571 Suspend a client by sending
572 .Dv SIGTSTP
573 (tty stop).
574 .It Xo Ic switch-client
575 .Op Fl c Ar target-client
576 .Op Fl t Ar target-session
578 .D1 (alias: Ic switchc )
579 Switch the current session for client
580 .Ar target-client
582 .Ar target-session .
584 .Sh WINDOWS AND PANES
587 window may be in one of several modes.
588 The default permits direct access to the terminal attached to the window.
589 The other is copy mode, which permits a section of a window or its
590 history to be copied to a
591 .Em paste buffer
592 for later insertion into another window.
593 This mode is entered with the
594 .Ic copy-mode
595 command, bound to
596 .Ql \&[
597 by default.
598 It is also entered when a command that produces output, such as
599 .Ic list-keys ,
600 is executed from a key binding.
602 The keys available depend on whether emacs or vi mode is selected
603 (see the
604 .Ic mode-keys
605 option).
606 The following keys are supported as appropriate for the mode:
607 .Bl -column "FunctionXXXXXXXXXXXXXXXXX" "viXXXXXXXXXX" "emacs" -offset indent
608 .It Sy "Function" Ta Sy "vi" Ta Sy "emacs"
609 .It Li "Back to indentation" Ta "^" Ta "M-m"
610 .It Li "Bottom of history" Ta "G" Ta "M-<"
611 .It Li "Clear selection" Ta "Escape" Ta "C-g"
612 .It Li "Copy selection" Ta "Enter" Ta "M-w"
613 .It Li "Cursor down" Ta "j" Ta "Down"
614 .It Li "Cursor left" Ta "h" Ta "Left"
615 .It Li "Cursor right" Ta "l" Ta "Right"
616 .It Li "Cursor to bottom line" Ta "L" Ta ""
617 .It Li "Cursor to middle line" Ta "M" Ta "M-r"
618 .It Li "Cursor to top line" Ta "H" Ta "M-R"
619 .It Li "Cursor up" Ta "k" Ta "Up"
620 .It Li "Delete entire line" Ta "d" Ta "C-u"
621 .It Li "Delete to end of line" Ta "D" Ta "C-k"
622 .It Li "End of line" Ta "$" Ta "C-e"
623 .It Li "Go to line" Ta ":" Ta "g"
624 .It Li "Half page down" Ta "C-d" Ta "M-Down"
625 .It Li "Half page up" Ta "C-u" Ta "M-Up"
626 .It Li "Jump forward" Ta "f" Ta "f"
627 .It Li "Jump backward" Ta "F" Ta "F"
628 .It Li "Jump again" Ta ";" Ta ";"
629 .It Li "Jump again in reverse" Ta "," Ta ","
630 .It Li "Next page" Ta "C-f" Ta "Page down"
631 .It Li "Next space" Ta "W" Ta ""
632 .It Li "Next space, end of word" Ta "E" Ta ""
633 .It Li "Next word" Ta "w" Ta ""
634 .It Li "Next word end" Ta "e" Ta "M-f"
635 .It Li "Paste buffer" Ta "p" Ta "C-y"
636 .It Li "Previous page" Ta "C-b" Ta "Page up"
637 .It Li "Previous word" Ta "b" Ta "M-b"
638 .It Li "Previous space" Ta "B" Ta ""
639 .It Li "Quit mode" Ta "q" Ta "Escape"
640 .It Li "Rectangle toggle" Ta "v" Ta "R"
641 .It Li "Scroll down" Ta "C-Down or C-e" Ta "C-Down"
642 .It Li "Scroll up" Ta "C-Up or C-y" Ta "C-Up"
643 .It Li "Search again" Ta "n" Ta "n"
644 .It Li "Search again in reverse" Ta "N" Ta "N"
645 .It Li "Search backward" Ta "?" Ta "C-r"
646 .It Li "Search forward" Ta "/" Ta "C-s"
647 .It Li "Start of line" Ta "0" Ta "C-a"
648 .It Li "Start selection" Ta "Space" Ta "C-Space"
649 .It Li "Top of history" Ta "g" Ta "M->"
650 .It Li "Transpose chars" Ta "" Ta "C-t"
653 The next and previous word keys use space and the
654 .Ql - ,
655 .Ql _
657 .Ql @
658 characters as word delimiters by default, but this can be adjusted by
659 setting the
660 .Em word-separators
661 window option.
662 Next word moves to the start of the next word, next word end to the end of the
663 next word and previous word to the start of the previous word.
664 The three next and previous space keys work similarly but use a space alone as
665 the word separator.
667 The jump commands enable quick movement within a line.
668 For instance, typing
669 .Ql f
670 followed by
671 .Ql /
672 will move the cursor to the next
673 .Ql /
674 character on the current line.
676 .Ql \&;
677 will then jump to the next occurrence.
679 Commands in copy mode may be prefaced by an optional repeat count.
680 With vi key bindings, a prefix is entered using the number keys; with
681 emacs, the Alt (meta) key and a number begins prefix entry.
682 For example, to move the cursor forward by ten words, use
683 .Ql M-1 0 M-f
684 in emacs mode, and
685 .Ql 10w
686 in vi.
688 Mode key bindings are defined in a set of named tables:
689 .Em vi-edit
691 .Em emacs-edit
692 for keys used when line editing at the command prompt;
693 .Em vi-choice
695 .Em emacs-choice
696 for keys used when choosing from lists (such as produced by the
697 .Ic choose-window
698 command); and
699 .Em vi-copy
701 .Em emacs-copy
702 used in copy mode.
703 The tables may be viewed with the
704 .Ic list-keys
705 command and keys modified or removed with
706 .Ic bind-key
708 .Ic unbind-key .
710 The paste buffer key pastes the first line from the top paste buffer on the
711 stack.
713 The synopsis for the
714 .Ic copy-mode
715 command is:
716 .Bl -tag -width Ds
717 .It Xo Ic copy-mode
718 .Op Fl u
719 .Op Fl t Ar target-pane
721 Enter copy mode.
723 .Fl u
724 option scrolls one page up.
727 Each window displayed by
729 may be split into one or more
730 .Em panes ;
731 each pane takes up a certain area of the display and is a separate terminal.
732 A window may be split into panes using the
733 .Ic split-window
734 command.
735 Windows may be split horizontally (with the
736 .Fl h
737 flag) or vertically.
738 Panes may be resized with the
739 .Ic resize-pane
740 command (bound to
741 .Ql C-up ,
742 .Ql C-down
743 .Ql C-left
745 .Ql C-right
746 by default), the current pane may be changed with the
747 .Ic select-pane
748 command and the
749 .Ic rotate-window
751 .Ic swap-pane
752 commands may be used to swap panes without changing their position.
753 Panes are numbered beginning from zero in the order they are created.
755 A number of preset
756 .Em layouts
757 are available.
758 These may be selected with the
759 .Ic select-layout
760 command or cycled with
761 .Ic next-layout
762 (bound to
763 .Ql Space
764 by default); once a layout is chosen, panes within it may be moved and resized
765 as normal.
767 The following layouts are supported:
768 .Bl -tag -width Ds
769 .It Ic even-horizontal
770 Panes are spread out evenly from left to right across the window.
771 .It Ic even-vertical
772 Panes are spread evenly from top to bottom.
773 .It Ic main-horizontal
774 A large (main) pane is shown at the top of the window and the remaining panes
775 are spread from left to right in the leftover space at the bottom.
776 Use the
777 .Em main-pane-height
778 window option to specify the height of the top pane.
779 .It Ic main-vertical
780 Similar to
781 .Ic main-horizontal
782 but the large pane is placed on the left and the others spread from top to
783 bottom along the right.
784 See the
785 .Em main-pane-width
786 window option.
787 .It Ic tiled
788 Panes are spread out as evenly as possible over the window in both rows and
789 columns.
792 Commands related to windows and panes are as follows:
793 .Bl -tag -width Ds
794 .It Xo Ic break-pane
795 .Op Fl d
796 .Op Fl t Ar target-pane
798 .D1 (alias: Ic breakp )
799 Break
800 .Ar target-pane
801 off from its containing window to make it the only pane in a new window.
803 .Fl d
804 is given, the new window does not become the current window.
805 .It Xo Ic capture-pane
806 .Op Fl b Ar buffer-index
807 .Op Fl t Ar target-pane
809 .D1 (alias: Ic capturep )
810 Capture the contents of a pane to the specified buffer, or a new buffer if none
811 is specified.
812 .It Xo
813 .Ic choose-client
814 .Op Fl t Ar target-window
815 .Op Ar template
817 Put a window into client choice mode, allowing a client to be selected
818 interactively from a list.
819 After a client is chosen,
820 .Ql %%
821 is replaced by the client
822 .Xr pty 4
823 path in
824 .Ar template
825 and the result executed as a command.
827 .Ar template
828 is not given, "detach-client -t '%%'" is used.
829 This command works only from inside
830 .Nm .
831 .It Xo
832 .Ic choose-session
833 .Op Fl t Ar target-window
834 .Op Ar template
836 Put a window into session choice mode, where a session may be selected
837 interactively from a list.
838 When one is chosen,
839 .Ql %%
840 is replaced by the session name in
841 .Ar template
842 and the result executed as a command.
844 .Ar template
845 is not given, "switch-client -t '%%'" is used.
846 This command works only from inside
847 .Nm .
848 .It Xo
849 .Ic choose-window
850 .Op Fl t Ar target-window
851 .Op Ar template
853 Put a window into window choice mode, where a window may be chosen
854 interactively from a list.
855 After a window is selected,
856 .Ql %%
857 is replaced by the session name and window index in
858 .Ar template
859 and the result executed as a command.
861 .Ar template
862 is not given, "select-window -t '%%'" is used.
863 This command works only from inside
864 .Nm .
865 .It Ic display-panes Op Fl t Ar target-client
866 .D1 (alias: Ic displayp)
867 Display a visible indicator of each pane shown by
868 .Ar target-client .
869 See the
870 .Ic display-panes-time ,
871 .Ic display-panes-colour ,
873 .Ic display-panes-active-colour
874 session options.
875 While the indicator is on screen, a pane may be selected with the
876 .Ql 0
878 .Ql 9
879 keys.
880 .It Xo Ic find-window
881 .Op Fl t Ar target-window
882 .Ar match-string
884 .D1 (alias: Ic findw )
885 Search for the
886 .Xr fnmatch 3
887 pattern
888 .Ar match-string
889 in window names, titles, and visible content (but not history).
890 If only one window is matched, it'll be automatically selected, otherwise a
891 choice list is shown.
892 This command only works from inside
893 .Nm .
894 .It Xo Ic join-pane
895 .Op Fl dhv
896 .Oo Fl l
897 .Ar size |
898 .Fl p Ar percentage Oc
899 .Op Fl s Ar src-pane
900 .Op Fl t Ar dst-pane
902 .D1 (alias: Ic joinp )
903 Like
904 .Ic split-window ,
905 but instead of splitting
906 .Ar dst-pane
907 and creating a new pane, split it and move
908 .Ar src-pane
909 into the space.
910 This can be used to reverse
911 .Ic break-pane .
912 .It Xo Ic kill-pane
913 .Op Fl a
914 .Op Fl t Ar target-pane
916 .D1 (alias: Ic killp )
917 Destroy the given pane.
918 If no panes remain in the containing window, it is also destroyed.
920 .Fl a
921 option kills all but the pane given with
922 .Fl t .
923 .It Ic kill-window Op Fl t Ar target-window
924 .D1 (alias: Ic killw )
925 Kill the current window or the window at
926 .Ar target-window ,
927 removing it from any sessions to which it is linked.
928 .It Ic last-window Op Fl t Ar target-session
929 .D1 (alias: Ic last )
930 Select the last (previously selected) window.
931 If no
932 .Ar target-session
933 is specified, select the last window of the current session.
934 .It Xo Ic link-window
935 .Op Fl dk
936 .Op Fl s Ar src-window
937 .Op Fl t Ar dst-window
939 .D1 (alias: Ic linkw )
940 Link the window at
941 .Ar src-window
942 to the specified
943 .Ar dst-window .
945 .Ar dst-window
946 is specified and no such window exists, the
947 .Ar src-window
948 is linked there.
950 .Fl k
951 is given and
952 .Ar dst-window
953 exists, it is killed, otherwise an error is generated.
955 .Fl d
956 is given, the newly linked window is not selected.
957 .It Ic list-panes Op Fl t Ar target-window
958 .D1 (alias: Ic lsp )
959 List the panes in the current window or in
960 .Ar target-window .
961 .It Ic list-windows Op Fl t Ar target-session
962 .D1 (alias: Ic lsw )
963 List windows in the current session or in
964 .Ar target-session .
965 .It Xo Ic move-window
966 .Op Fl d
967 .Op Fl s Ar src-window
968 .Op Fl t Ar dst-window
970 .D1 (alias: Ic movew )
971 This is similar to
972 .Ic link-window ,
973 except the window at
974 .Ar src-window
975 is moved to
976 .Ar dst-window .
977 .It Xo Ic new-window
978 .Op Fl adk
979 .Op Fl n Ar window-name
980 .Op Fl t Ar target-window
981 .Op Ar shell-command
983 .D1 (alias: Ic neww )
984 Create a new window.
985 With
986 .Fl a ,
987 the new window is inserted at the next index up from the specified
988 .Ar target-window ,
989 moving windows up if necessary,
990 otherwise
991 .Ar target-window
992 is the new window location.
995 .Fl d
996 is given, the session does not make the new window the current window.
997 .Ar target-window
998 represents the window to be created; if the target already exists an error is
999 shown, unless the
1000 .Fl k
1001 flag is used, in which case it is destroyed.
1002 .Ar shell-command
1003 is the command to execute.
1005 .Ar shell-command
1006 is not specified, the value of the
1007 .Ic default-command
1008 option is used.
1010 When the shell command completes, the window closes.
1011 See the
1012 .Ic remain-on-exit
1013 option to change this behaviour.
1016 .Ev TERM
1017 environment variable must be set to
1018 .Dq screen
1019 for all programs running
1020 .Em inside
1021 .Nm .
1022 New windows will automatically have
1023 .Dq TERM=screen
1024 added to their environment, but care must be taken not to reset this in shell
1025 start-up files.
1026 .It Ic next-layout Op Fl t Ar target-window
1027 .D1 (alias: Ic nextl )
1028 Move a window to the next layout and rearrange the panes to fit.
1029 .It Xo Ic next-window
1030 .Op Fl a
1031 .Op Fl t Ar target-session
1033 .D1 (alias: Ic next )
1034 Move to the next window in the session.
1036 .Fl a
1037 is used, move to the next window with a bell, activity or content alert.
1038 .It Xo Ic pipe-pane
1039 .Op Fl o
1040 .Op Fl t Ar target-pane
1041 .Op Ar shell-command
1043 .D1 (alias: Ic pipep )
1044 Pipe any output sent by the program in
1045 .Ar target-pane
1046 to a shell command.
1047 A pane may only be piped to one command at a time, any existing pipe is
1048 closed before
1049 .Ar shell-command
1050 is executed.
1051 If no
1052 .Ar shell-command
1053 is given, the current pipe (if any) is closed.
1056 .Fl o
1057 option only opens a new pipe if no previous pipe exists, allowing a pipe to
1058 be toggled with a single key, for example:
1059 .Bd -literal -offset indent
1060 bind-key C-p pipe-pane -o 'cat >>~/output'
1062 .It Xo Ic previous-window
1063 .Op Fl a
1064 .Op Fl t Ar target-session
1066 .D1 (alias: Ic prev )
1067 Move to the previous window in the session.
1068 With
1069 .Fl a ,
1070 move to the previous window with a bell, activity or content alert.
1071 .It Xo Ic rename-window
1072 .Op Fl t Ar target-window
1073 .Ar new-name
1075 .D1 (alias: Ic renamew )
1076 Rename the current window, or the window at
1077 .Ar target-window
1078 if specified, to
1079 .Ar new-name .
1080 .It Xo Ic resize-pane
1081 .Op Fl DLRU
1082 .Op Fl t Ar target-pane
1083 .Op Ar adjustment
1085 .D1 (alias: Ic resizep )
1086 Resize a pane, upward with
1087 .Fl U
1088 (the default), downward with
1089 .Fl D ,
1090 to the left with
1091 .Fl L
1092 and to the right with
1093 .Fl R .
1095 .Ar adjustment
1096 is given in lines or cells (the default is 1).
1097 .It Xo Ic respawn-window
1098 .Op Fl k
1099 .Op Fl t Ar target-window
1100 .Op Ar shell-command
1102 .D1 (alias: Ic respawnw )
1103 Reactivate a window in which the command has exited (see the
1104 .Ic remain-on-exit
1105 window option).
1107 .Ar shell-command
1108 is not given, the command used when the window was created is executed.
1109 The window must be already inactive, unless
1110 .Fl k
1111 is given, in which case any existing command is killed.
1112 .It Xo Ic rotate-window
1113 .Op Fl DU
1114 .Op Fl t Ar target-window
1116 .D1 (alias: Ic rotatew )
1117 Rotate the positions of the panes within a window, either upward (numerically
1118 lower) with
1119 .Fl U
1120 or downward (numerically higher).
1121 .It Xo Ic select-layout
1122 .Op Fl t Ar target-window
1123 .Op Ar layout-name
1125 .D1 (alias: selectl )
1126 Choose a specific layout for a window.
1128 .Ar layout-name
1129 is not given, the last layout used (if any) is reapplied.
1130 .It Xo Ic select-pane
1131 .Op Fl DLRU
1132 .Op Fl t Ar target-pane
1134 .D1 (alias: Ic selectp )
1135 Make pane
1136 .Ar target-pane
1137 the active pane in window
1138 .Ar target-window .
1139 If one of
1140 .Fl D ,
1141 .Fl L ,
1142 .Fl R ,
1144 .Fl U
1145 is used, respectively the pane below, to the left, to the right, or above the
1146 target pane is used.
1147 .It Ic select-window Op Fl t Ar target-window
1148 .D1 (alias: Ic selectw )
1149 Select the window at
1150 .Ar target-window .
1151 .It Xo Ic split-window
1152 .Op Fl dhv
1153 .Oo Fl l
1154 .Ar size |
1155 .Fl p Ar percentage Oc
1156 .Op Fl t Ar target-pane
1157 .Op Ar shell-command
1159 .D1 (alias: splitw )
1160 Create a new pane by splitting
1161 .Ar target-pane :
1162 .Fl h
1163 does a horizontal split and
1164 .Fl v
1165 a vertical split; if neither is specified,
1166 .Fl v
1167 is assumed.
1169 .Fl l
1171 .Fl p
1172 options specify the size of the new pane in lines (for vertical split) or in
1173 cells (for horizontal split), or as a percentage, respectively.
1174 All other options have the same meaning as for the
1175 .Ic new-window
1176 command.
1177 .It Xo Ic swap-pane
1178 .Op Fl dDU
1179 .Op Fl s Ar src-pane
1180 .Op Fl t Ar dst-pane
1182 .D1 (alias: Ic swapp )
1183 Swap two panes.
1185 .Fl U
1186 is used and no source pane is specified with
1187 .Fl s ,
1188 .Ar dst-pane
1189 is swapped with the previous pane (before it numerically);
1190 .Fl D
1191 swaps with the next pane (after it numerically).
1192 .Fl d
1193 instructs
1195 not to change the active pane.
1196 .It Xo Ic swap-window
1197 .Op Fl d
1198 .Op Fl s Ar src-window
1199 .Op Fl t Ar dst-window
1201 .D1 (alias: Ic swapw )
1202 This is similar to
1203 .Ic link-window ,
1204 except the source and destination windows are swapped.
1205 It is an error if no window exists at
1206 .Ar src-window .
1207 .It Xo Ic unlink-window
1208 .Op Fl k
1209 .Op Fl t Ar target-window
1211 .D1 (alias: Ic unlinkw )
1212 Unlink
1213 .Ar target-window .
1214 Unless
1215 .Fl k
1216 is given, a window may be unlinked only if it is linked to multiple sessions -
1217 windows may not be linked to no sessions;
1219 .Fl k
1220 is specified and the window is linked to only one session, it is unlinked and
1221 destroyed.
1223 .Sh KEY BINDINGS
1225 allows a command to be bound to most keys, with or without a prefix key.
1226 When specifying keys, most represent themselves (for example
1227 .Ql A
1229 .Ql Z ) .
1230 Ctrl keys may be prefixed with
1231 .Ql C-
1233 .Ql ^ ,
1234 and Alt (meta) with
1235 .Ql M- .
1236 In addition, the following special key names are accepted:
1237 .Em Up ,
1238 .Em Down ,
1239 .Em Left ,
1240 .Em Right ,
1241 .Em BSpace ,
1242 .Em BTab ,
1243 .Em DC
1244 (Delete),
1245 .Em End ,
1246 .Em Enter ,
1247 .Em Escape ,
1248 .Em F1
1250 .Em F20 ,
1251 .Em Home ,
1252 .Em IC
1253 (Insert),
1254 .Em NPage
1255 (Page Up),
1256 .Em PPage
1257 (Page Down),
1258 .Em Space ,
1260 .Em Tab .
1261 Note that to bind the
1262 .Ql \&"
1264 .Ql '
1265 keys, quotation marks are necessary, for example:
1266 .Bd -literal -offset indent
1267 bind-key '"' split-window
1268 bind-key "'" new-window
1271 Commands related to key bindings are as follows:
1272 .Bl -tag -width Ds
1273 .It Xo Ic bind-key
1274 .Op Fl cnr
1275 .Op Fl t Ar key-table
1276 .Ar key Ar command Op Ar arguments
1278 .D1 (alias: Ic bind )
1279 Bind key
1280 .Ar key
1282 .Ar command .
1283 By default (without
1284 .Fl t )
1285 the primary key bindings are modified (those normally activated with the prefix
1286 key); in this case, if
1287 .Fl n
1288 is specified, it is not necessary to use the prefix key,
1289 .Ar command
1290 is bound to
1291 .Ar key
1292 alone.
1294 .Fl r
1295 flag indicates this key may repeat, see the
1296 .Ic repeat-time
1297 option.
1300 .Fl t
1301 is present,
1302 .Ar key
1303 is bound in
1304 .Ar key-table :
1305 the binding for command mode with
1306 .Fl c
1307 or for normal mode without.
1308 To view the default bindings and possible commands, see the
1309 .Ic list-keys
1310 command.
1311 .It Ic list-keys Op Fl t Ar key-table
1312 .D1 (alias: Ic lsk )
1313 List all key bindings.
1314 Without
1315 .Fl t
1316 the primary key bindings - those executed when preceded by the prefix key -
1317 are printed.
1318 Keys bound without the prefix key (see
1319 .Ic bind-key
1320 .Fl n )
1321 are marked with
1322 .Ql (no prefix) .
1324 With
1325 .Fl t ,
1326 the key bindings in
1327 .Ar key-table
1328 are listed; this may be one of:
1329 .Em vi-edit ,
1330 .Em emacs-edit ,
1331 .Em vi-choice ,
1332 .Em emacs-choice ,
1333 .Em vi-copy
1335 .Em emacs-copy .
1336 .It Xo Ic send-keys
1337 .Op Fl t Ar target-pane
1338 .Ar key Ar ...
1340 .D1 (alias: Ic send )
1341 Send a key or keys to a window.
1342 Each argument
1343 .Ar key
1344 is the name of the key (such as
1345 .Ql C-a
1347 .Ql npage
1348 ) to send; if the string is not recognised as a key, it is sent as a series of
1349 characters.
1350 All arguments are sent sequentially from first to last.
1351 .It Ic send-prefix Op Fl t Ar target-pane
1352 Send the prefix key to a window as if it was pressed.
1353 If multiple prefix keys are configured, only the first is sent.
1354 .It Xo Ic unbind-key
1355 .Op Fl cn
1356 .Op Fl t Ar key-table
1357 .Ar key
1359 .D1 (alias: Ic unbind )
1360 Unbind the command bound to
1361 .Ar key .
1362 Without
1363 .Fl t
1364 the primary key bindings are modified; in this case, if
1365 .Fl n
1366 is specified, the command bound to
1367 .Ar key
1368 without a prefix (if any) is removed.
1371 .Fl t
1372 is present,
1373 .Ar key
1375 .Ar key-table
1376 is unbound: the binding for command mode with
1377 .Fl c
1378 or for normal mode without.
1380 .Sh OPTIONS
1381 The appearance and behaviour of
1383 may be modified by changing the value of various options.
1384 There are three types of option:
1385 .Em server options ,
1386 .Em session options
1388 .Em window options .
1392 server has a set of global options which do not apply to any particular
1393 window or session.
1394 These are altered with the
1395 .Ic set-option
1396 .Fl s
1397 command, or displayed with the
1398 .Ic show-options
1399 .Fl s
1400 command.
1402 In addition, each individual session may have a set of session options, and
1403 there is a separate set of global session options.
1404 Sessions which do not have a particular option configured inherit the value
1405 from the global session options.
1406 Session options are set or unset with the
1407 .Ic set-option
1408 command and may be listed with the
1409 .Ic show-options
1410 command.
1411 The available server and session options are listed under the
1412 .Ic set-option
1413 command.
1415 Similarly, a set of window options is attached to each window, and there is
1416 a set of global window options from which any unset options are inherited.
1417 Window options are altered with the
1418 .Ic set-window-option
1419 command and can be listed with the
1420 .Ic show-window-options
1421 command.
1422 All window options are documented with the
1423 .Ic set-window-option
1424 command.
1426 Commands which set options are as follows:
1427 .Bl -tag -width Ds
1428 .It Xo Ic set-option
1429 .Op Fl agsuw
1430 .Op Fl t Ar target-session | Ar target-window
1431 .Ar option Ar value
1433 .D1 (alias: Ic set )
1434 Set a window option with
1435 .Fl w
1436 (equivalent to the
1437 .Ic set-window-option
1438 command),
1439 a server option with
1440 .Fl s ,
1441 otherwise a session option.
1444 .Fl g
1445 is specified, the global session or window option is set.
1446 With
1447 .Fl a ,
1448 and if the option expects a string,
1449 .Ar value
1450 is appended to the existing setting.
1452 .Fl u
1453 flag unsets an option, so a session inherits the option from the global
1454 options.
1455 It is not possible to unset a global option.
1457 Available window options are listed under
1458 .Ic set-window-option .
1460 Available server options are:
1461 .Bl -tag -width Ds
1462 .It Ic escape-time
1463 Set the time in milliseconds for which
1465 waits after an escape is input to determine if it is part of a function or meta
1466 key sequences.
1467 The default is 500 milliseconds.
1468 .It Ic quiet
1469 Enable or disable the display of various informational messages (see also the
1470 .Fl q
1471 command line flag).
1474 Available session options are:
1475 .Bl -tag -width Ds
1476 .It Ic base-index Ar index
1477 Set the base index from which an unused index should be searched when a new
1478 window is created.
1479 The default is zero.
1480 .It Xo Ic bell-action
1481 .Op Ic any | none | current
1483 Set action on window bell.
1484 .Ic any
1485 means a bell in any window linked to a session causes a bell in the current
1486 window of that session,
1487 .Ic none
1488 means all bells are ignored and
1489 .Ic current
1490 means only bell in windows other than the current window are ignored.
1491 .It Ic buffer-limit Ar number
1492 Set the number of buffers kept for each session; as new buffers are added to
1493 the top of the stack, old ones are removed from the bottom if necessary to
1494 maintain this maximum length.
1495 .It Ic default-command Ar shell-command
1496 Set the command used for new windows (if not specified when the window is
1497 created) to
1498 .Ar shell-command ,
1499 which may be any
1500 .Xr sh 1
1501 command.
1502 The default is an empty string, which instructs
1504 to create a login shell using the value of the
1505 .Ic default-shell
1506 option.
1507 .It Ic default-shell Ar path
1508 Specify the default shell.
1509 This is used as the login shell for new windows when the
1510 .Ic default-command
1511 option is set to empty, and must be the full path of the executable.
1512 When started
1514 tries to set a default value from the first suitable of the
1515 .Ev SHELL
1516 environment variable, the shell returned by
1517 .Xr getpwuid 3 ,
1519 .Pa /bin/sh .
1520 This option should be configured when
1522 is used as a login shell.
1523 .It Ic default-path Ar path
1524 Set the default working directory for processes created from keys, or
1525 interactively from the prompt.
1526 The default is the current working directory when the server is started.
1527 .It Ic default-terminal Ar terminal
1528 Set the default terminal for new windows created in this session - the
1529 default value of the
1530 .Ev TERM
1531 environment variable.
1534 to work correctly, this
1535 .Em must
1536 be set to
1537 .Ql screen
1538 or a derivative of it.
1539 .It Ic display-panes-active-colour Ar colour
1540 Set the colour used by the
1541 .Ic display-panes
1542 command to show the indicator for the active pane.
1543 .It Ic display-panes-colour Ar colour
1544 Set the colour used by the
1545 .Ic display-panes
1546 command to show the indicators for inactive panes.
1547 .It Ic display-panes-time Ar time
1548 Set the time in milliseconds for which the indicators shown by the
1549 .Ic display-panes
1550 command appear.
1551 .It Ic display-time Ar time
1552 Set the amount of time for which status line messages and other on-screen
1553 indicators are displayed.
1554 .Ar time
1555 is in milliseconds.
1556 .It Ic history-limit Ar lines
1557 Set the maximum number of lines held in window history.
1558 This setting applies only to new windows - existing window histories are not
1559 resized and retain the limit at the point they were created.
1560 .It Ic lock-after-time Ar number
1561 Lock the session (like the
1562 .Ic lock-session
1563 command) after
1564 .Ar number
1565 seconds of inactivity, or the entire server (all sessions) if the
1566 .Ic lock-server
1567 option is set.
1568 The default is not to lock (set to 0).
1569 .It Ic lock-command Ar shell-command
1570 Command to run when locking each client.
1571 The default is to run
1572 .Xr lock 1
1573 with
1574 .Fl np .
1575 .It Xo Ic lock-server
1576 .Op Ic on | off
1578 If this option is
1579 .Ic on
1580 (the default),
1581 instead of each session locking individually as each has been
1582 idle for
1583 .Ic lock-after-time ,
1584 the entire server will lock after
1585 .Em all
1586 sessions would have locked.
1587 This has no effect as a session option; it must be set as a global option.
1588 .It Ic message-attr Ar attributes
1589 Set status line message attributes, where
1590 .Ar attributes
1591 is either
1592 .Ic none
1593 or a comma-delimited list of one or more of:
1594 .Ic bright
1596 .Ic bold ) ,
1597 .Ic dim ,
1598 .Ic underscore ,
1599 .Ic blink ,
1600 .Ic reverse ,
1601 .Ic hidden ,
1603 .Ic italics .
1604 .It Ic message-bg Ar colour
1605 Set status line message background colour, where
1606 .Ar colour
1607 is one of:
1608 .Ic black ,
1609 .Ic red ,
1610 .Ic green ,
1611 .Ic yellow ,
1612 .Ic blue ,
1613 .Ic magenta ,
1614 .Ic cyan ,
1615 .Ic white ,
1616 .Ic colour0
1618 .Ic colour255
1619 from the 256-colour palette, or
1620 .Ic default .
1621 .It Ic message-fg Ar colour
1622 Set status line message foreground colour.
1623 .It Ic message-limit Ar number
1624 Set the number of error or information messages to save in the message log for
1625 each client.
1626 The default is 20.
1627 .It Xo Ic mouse-select-pane
1628 .Op Ic on | off
1630 If on,
1632 captures the mouse and when a window is split into multiple panes the mouse may
1633 be used to select the current pane.
1634 The mouse click is also passed through to the application as normal.
1635 .It Ic pane-border-fg Ar colour
1636 .It Ic pane-border-bg Ar colour
1637 Set the pane border colour for panes aside from the active pane.
1638 .It Ic pane-active-border-fg Ar colour
1639 .It Ic pane-active-border-bg Ar colour
1640 Set the pane border colour for the currently active pane.
1641 .It Ic prefix Ar keys
1642 Set the keys accepted as a prefix key.
1643 .Ar keys
1644 is a comma-separated list of key names, each of which individually behave as
1645 the prefix key.
1646 .It Ic repeat-time Ar time
1647 Allow multiple commands to be entered without pressing the prefix-key again
1648 in the specified
1649 .Ar time
1650 milliseconds (the default is 500).
1651 Whether a key repeats may be set when it is bound using the
1652 .Fl r
1653 flag to
1654 .Ic bind-key .
1655 Repeat is enabled for the default keys bound to the
1656 .Ic resize-pane
1657 command.
1658 .It Xo Ic set-remain-on-exit
1659 .Op Ic on | off
1661 Set the
1662 .Ic remain-on-exit
1663 window option for any windows first created in this session.
1664 When this option is true, windows in which the running program has
1665 exited do not close, instead remaining open but inactivate.
1666 Use the
1667 .Ic respawn-window
1668 command to reactivate such a window, or the
1669 .Ic kill-window
1670 command to destroy it.
1671 .It Xo Ic set-titles
1672 .Op Ic on | off
1674 Attempt to set the window title using the \ee]2;...\e007 xterm code if
1675 the terminal appears to be an xterm.
1676 This option is off by default.
1677 Note that elinks
1678 will only attempt to set the window title if the STY environment
1679 variable is set.
1680 .It Ic set-titles-string Ar string
1681 String used to set the window title if
1682 .Ic set-titles
1683 is on.
1684 Character sequences are replaced as for the
1685 .Ic status-left
1686 option.
1687 .It Xo Ic status
1688 .Op Ic on | off
1690 Show or hide the status line.
1691 .It Ic status-attr Ar attributes
1692 Set status line attributes.
1693 .It Ic status-bg Ar colour
1694 Set status line background colour.
1695 .It Ic status-fg Ar colour
1696 Set status line foreground colour.
1697 .It Ic status-interval Ar interval
1698 Update the status bar every
1699 .Ar interval
1700 seconds.
1701 By default, updates will occur every 15 seconds.
1702 A setting of zero disables redrawing at interval.
1703 .It Xo Ic status-justify
1704 .Op Ic left | centre | right
1706 Set the position of the window list component of the status line: left, centre
1707 or right justified.
1708 .It Xo Ic status-keys
1709 .Op Ic vi | emacs
1711 Use vi or emacs-style
1712 key bindings in the status line, for example at the command prompt.
1713 Defaults to emacs.
1714 .It Ic status-left Ar string
1715 Display
1716 .Ar string
1717 to the left of the status bar.
1718 .Ar string
1719 will be passed through
1720 .Xr strftime 3
1721 before being used.
1722 By default, the session name is shown.
1723 .Ar string
1724 may contain any of the following special character sequences:
1725 .Bl -column "Character pair" "Replaced with" -offset indent
1726 .It Sy "Character pair" Ta Sy "Replaced with"
1727 .It Li "#(shell-command)" Ta "First line of the command's output"
1728 .It Li "#[attributes]" Ta "Colour or attribute change"
1729 .It Li "#H" Ta "Hostname of local host"
1730 .It Li "#F" Ta "Current window flag"
1731 .It Li "#I" Ta "Current window index"
1732 .It Li "#P" Ta "Current pane index"
1733 .It Li "#S" Ta "Session name"
1734 .It Li "#T" Ta "Current window title"
1735 .It Li "#W" Ta "Current window name"
1736 .It Li "##" Ta "A literal" Ql #
1739 The #(shell-command) form executes
1740 .Ql shell-command
1741 and inserts the first line of its output.
1742 Note that shell commands are only executed once at the interval specified by
1744 .Ic status-interval
1745 option: if the status line is redrawn in the meantime, the previous result is
1746 used.
1747 Shell commands are executed with the
1749 global environment set (see the
1750 .Sx ENVIRONMENT
1751 section).
1753 The window title (#T) is the title set by the program running within the window
1754 using the OSC title setting sequence, for example:
1755 .Bd -literal -offset indent
1756 $ printf '\e033]2;My Title\e033\e\e'
1759 When a window is first created, its title is the hostname.
1761 #[attributes] allows a comma-separated list of attributes to be specified,
1762 these may be
1763 .Ql fg=colour
1764 to set the foreground colour,
1765 .Ql bg=colour
1766 to set the background colour, the name of one of the attributes (listed under
1768 .Ic message-attr
1769 option) to turn an attribute on, or an attribute prefixed with
1770 .Ql no
1771 to turn one off, for example
1772 .Ic nobright .
1773 Examples are:
1774 .Bd -literal -offset indent
1775 #(sysctl vm.loadavg)
1776 #[fg=yellow,bold]#(apm -l)%%#[default] [#S]
1779 Where appropriate, special character sequences may be prefixed with a number to
1780 specify the maximum length, for example
1781 .Ql #24T .
1783 By default, UTF-8 in
1784 .Ar string
1785 is not interpreted, to enable UTF-8, use the
1786 .Ic status-utf8
1787 option.
1788 .It Ic status-left-attr Ar attributes
1789 Set the attribute of the left part of the status line.
1790 .It Ic status-left-fg Ar colour
1791 Set the foreground colour of the left part of the status line.
1792 .It Ic status-left-bg Ar colour
1793 Set the background colour of the left part of the status line.
1794 .It Ic status-left-length Ar length
1795 Set the maximum
1796 .Ar length
1797 of the left component of the status bar.
1798 The default is 10.
1799 .It Ic status-right Ar string
1800 Display
1801 .Ar string
1802 to the right of the status bar.
1803 By default, the current window title in double quotes, the date and the time
1804 are shown.
1805 As with
1806 .Ic status-left ,
1807 .Ar string
1808 will be passed to
1809 .Xr strftime 3 ,
1810 character pairs are replaced, and UTF-8 is dependent on the
1811 .Ic status-utf8
1812 option.
1813 .It Ic status-right-attr Ar attributes
1814 Set the attribute of the right part of the status line.
1815 .It Ic status-right-fg Ar colour
1816 Set the foreground colour of the right part of the status line.
1817 .It Ic status-right-bg Ar colour
1818 Set the background colour of the right part of the status line.
1819 .It Ic status-right-length Ar length
1820 Set the maximum
1821 .Ar length
1822 of the right component of the status bar.
1823 The default is 40.
1825 .It Xo Ic status-utf8
1826 .Op Ic on | off
1828 Instruct
1830 to treat top-bit-set characters in the
1831 .Ic status-left
1833 .Ic status-right
1834 strings as UTF-8; notably, this is important for wide characters.
1835 This option defaults to off.
1836 .It Ic terminal-overrides Ar string
1837 Contains a list of entries which override terminal descriptions read using
1838 .Xr terminfo 5 .
1839 .Ar string
1840 is a comma-separated list of items each a colon-separated string made up of a
1841 terminal type pattern (matched using
1842 .Xr fnmatch 3 )
1843 and a set of
1844 .Em name=value
1845 entries.
1847 For example, to set the
1848 .Ql clear
1849 .Xr terminfo 5
1850 entry to
1851 .Ql \ee[H\ee[2J
1852 for all terminal types and the
1853 .Ql dch1
1854 entry to
1855 .Ql \ee[P
1856 for the
1857 .Ql rxvt
1858 terminal type, the option could be set to the string:
1859 .Bd -literal -offset indent
1860 "*:clear=\ee[H\ee[2J,rxvt:dch1=\ee[P"
1863 The terminal entry value is passed through
1864 .Xr strunvis 3
1865 before interpretation.
1866 The default value forcibly corrects the
1867 .Ql colors
1868 entry for terminals which support 88 or 256 colours:
1869 .Bd -literal -offset indent
1870 "*88col*:colors=88,*256col*:colors=256"
1872 .It Ic update-environment Ar variables
1873 Set a space-separated string containing a list of environment variables to be
1874 copied into the session environment when a new session is created or an
1875 existing session is attached.
1876 Any variables that do not exist in the source environment are set to be
1877 removed from the session environment (as if
1878 .Fl r
1879 was given to the
1880 .Ic set-environment
1881 command).
1882 The default is
1883 "DISPLAY WINDOWID SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION".
1884 .It Xo Ic visual-activity
1885 .Op Ic on | off
1887 If on, display a status line message when activity occurs in a window
1888 for which the
1889 .Ic monitor-activity
1890 window option is enabled.
1891 .It Xo Ic visual-bell
1892 .Op Ic on | off
1894 If this option is on, a message is shown on a bell instead of it being passed
1895 through to the terminal (which normally makes a sound).
1896 Also see the
1897 .Ic bell-action
1898 option.
1899 .It Xo Ic visual-content
1900 .Op Ic on | off
1902 Like
1903 .Ic visual-activity ,
1904 display a message when content is present in a window
1905 for which the
1906 .Ic monitor-content
1907 window option is enabled.
1909 .It Xo Ic set-window-option
1910 .Op Fl agu
1911 .Op Fl t Ar target-window
1912 .Ar option Ar value
1914 .D1 (alias: Ic setw )
1915 Set a window option.
1917 .Fl a ,
1918 .Fl g
1920 .Fl u
1921 flags work similarly to the
1922 .Ic set-option
1923 command.
1925 Supported window options are:
1927 .Bl -tag -width Ds -compact
1928 .It Xo Ic aggressive-resize
1929 .Op Ic on | off
1931 Aggressively resize the chosen window.
1932 This means that
1934 will resize the window to the size of the smallest session for which it is the
1935 current window, rather than the smallest session to which it is attached.
1936 The window may resize when the current window is changed on another sessions;
1937 this option is good for full-screen programs which support
1938 .Dv SIGWINCH
1939 and poor for interactive programs such as shells.
1941 .It Xo Ic automatic-rename
1942 .Op Ic on | off
1944 Control automatic window renaming.
1945 When this setting is enabled,
1947 will attempt - on supported platforms - to rename the window to reflect the
1948 command currently running in it.
1949 This flag is automatically disabled for an individual window when a name
1950 is specified at creation with
1951 .Ic new-window or
1952 .Ic new-session ,
1953 or later with
1954 .Ic rename-window .
1955 It may be switched off globally with:
1956 .Bd -literal -offset indent
1957 set-window-option -g automatic-rename off
1960 .It Ic clock-mode-colour Ar colour
1961 Set clock colour.
1963 .It Xo Ic clock-mode-style
1964 .Op Ic 12 | 24
1966 Set clock hour format.
1968 .It Ic force-height Ar height
1969 .It Ic force-width Ar width
1970 Prevent
1972 from resizing a window to greater than
1973 .Ar width
1975 .Ar height .
1976 A value of zero restores the default unlimited setting.
1978 .It Ic main-pane-width Ar width
1979 .It Ic main-pane-height Ar height
1980 Set the width or height of the main (left or top) pane in the
1981 .Ic main-horizontal
1983 .Ic main-vertical
1984 layouts.
1986 .It Ic mode-attr Ar attributes
1987 Set window modes attributes.
1989 .It Ic mode-bg Ar colour
1990 Set window modes background colour.
1992 .It Ic mode-fg Ar colour
1993 Set window modes foreground colour.
1995 .It Xo Ic mode-keys
1996 .Op Ic vi | emacs
1998 Use vi or emacs-style key bindings in copy and choice modes.
1999 Key bindings default to emacs.
2001 .It Xo Ic mode-mouse
2002 .Op Ic on | off
2004 Mouse state in modes.
2005 If on,
2007 will respond to mouse clicks by moving the cursor in copy mode or selecting an
2008 option in choice mode.
2010 .It Xo Ic monitor-activity
2011 .Op Ic on | off
2013 Monitor for activity in the window.
2014 Windows with activity are highlighted in the status line.
2016 .It Ic monitor-content Ar match-string
2017 Monitor content in the window.
2018 When
2019 .Xr fnmatch 3
2020 pattern
2021 .Ar match-string
2022 appears in the window, it is highlighted in the status line.
2024 .It Xo Ic remain-on-exit
2025 .Op Ic on | off
2027 A window with this flag set is not destroyed when the program running in it
2028 exits.
2029 The window may be reactivated with the
2030 .Ic respawn-window
2031 command.
2033 .It Xo Ic synchronize-panes
2034 .Op Ic on | off
2036 Duplicate input to any pane to all other panes in the same window (only
2037 for panes that are not in any special mode).
2039 .It Xo Ic alternate-screen
2040 .Op Ic on | off
2042 This option configures whether programs running inside
2044 may use the terminal alternate screen feature, which allows the
2045 .Em smcup
2047 .Em rmcup
2048 .Xr terminfo 5
2049 capabilities to be issued to preserve the existing window content on start and
2050 restore it on exit.
2052 .It Xo Ic utf8
2053 .Op Ic on | off
2055 Instructs
2057 to expect UTF-8 sequences to appear in this window.
2059 .It Ic window-status-attr Ar attributes
2060 Set status line attributes for a single window.
2062 .It Ic window-status-bg Ar colour
2063 Set status line background colour for a single window.
2065 .It Ic window-status-fg Ar colour
2066 Set status line foreground colour for a single window.
2068 .It Ic window-status-format Ar string
2069 Set the format in which the window is displayed in the status line window list.
2070 See the
2071 .Ar status-left
2072 option for details of special character sequences available.
2073 The default is
2074 .Ql #I:#W#F .
2076 .It Ic window-status-current-attr Ar attributes
2077 Set status line attributes for the currently active window.
2079 .It Ic window-status-current-bg Ar colour
2080 Set status line background colour for the currently active window.
2082 .It Ic window-status-current-fg Ar colour
2083 Set status line foreground colour for the currently active window.
2085 .It Ic window-status-current-format Ar string
2086 Like
2087 .Ar window-status-format ,
2088 but is the format used when the window is the current window.
2090 .It Ic word-separators Ar string
2091 Sets the window's conception of what characters are considered word
2092 separators, for the purposes of the next and previous word commands in
2093 copy mode.
2094 The default is
2095 .Ql \ -_@ .
2097 .It Xo Ic xterm-keys
2098 .Op Ic on | off
2100 If this option is set,
2102 will generate
2103 .Xr xterm 1 -style
2104 function key sequences; these have a number included to indicate modifiers such
2105 as Shift, Alt or Ctrl.
2106 The default is off.
2108 .It Xo Ic show-options
2109 .Op Fl gsw
2110 .Op Fl t Ar target-session | Ar target-window
2112 .D1 (alias: Ic show )
2113 Show the window options with
2114 .Fl w
2115 (equivalent to
2116 .Ic show-window-options ) ,
2117 the server options with
2118 .Fl s ,
2119 otherwise the session options for
2120 .Ar target session .
2121 Global session or window options are listed if
2122 .Fl g
2123 is used.
2124 .It Xo Ic show-window-options
2125 .Op Fl g
2126 .Op Fl t Ar target-window
2128 .D1 (alias: Ic showw )
2129 List the window options for
2130 .Ar target-window ,
2131 or the global window options if
2132 .Fl g
2133 is used.
2135 .Sh ENVIRONMENT
2136 When the server is started,
2138 copies the environment into the
2139 .Em global environment ;
2140 in addition, each session has a
2141 .Em session environment .
2142 When a window is created, the session and global environments are merged with
2143 the session environment overriding any variable present in both.
2144 This is the initial environment passed to the new process.
2147 .Ic update-environment
2148 session option may be used to update the session environment from the client
2149 when a new session is created or an old reattached.
2151 also initialises the
2152 .Ev TMUX
2153 variable with some internal information to allow commands to be executed
2154 from inside, and the
2155 .Ev TERM
2156 variable with the correct terminal setting of
2157 .Ql screen .
2159 Commands to alter and view the environment are:
2160 .Bl -tag -width Ds
2161 .It Xo Ic set-environment
2162 .Op Fl gru
2163 .Op Fl t Ar target-session
2164 .Ar name Op Ar value
2166 .D1 (alias: Ic setenv )
2167 Set or unset an environment variable.
2169 .Fl g
2170 is used, the change is made in the global environment; otherwise, it is applied
2171 to the session environment for
2172 .Ar target-session .
2174 .Fl u
2175 flag unsets a variable.
2176 .Fl r
2177 indicates the variable is to be removed from the environment before starting a
2178 new process.
2179 .It Xo Ic show-environment
2180 .Op Fl g
2181 .Op Fl t Ar target-session
2183 .D1 (alias: Ic showenv )
2184 Display the environment for
2185 .Ar target-session
2186 or the global environment with
2187 .Fl g .
2188 Variables removed from the environment are prefixed with
2189 .Ql - .
2191 .Sh STATUS LINE
2193 includes an optional status line which is displayed in the bottom line of each
2194 terminal.
2195 By default, the status line is enabled (it may be disabled with the
2196 .Ic status
2197 session option) and contains, from left-to-right: the name of the current
2198 session in square brackets; the window list; the current window title in double
2199 quotes; and the time and date.
2201 The status line is made of three parts: configurable left and right sections
2202 (which may contain dynamic content such as the time or output from a shell
2203 command, see the
2204 .Ic status-left ,
2205 .Ic status-left-length ,
2206 .Ic status-right ,
2208 .Ic status-right-length
2209 options below), and a central window list.
2210 By default, the window list shows the index, name and (if any) flag of the
2211 windows present in the current session in ascending numerical order.
2212 It may be customised with the
2213 .Ar window-status-format
2215 .Ar window-status-current-format
2216 options.
2217 The flag is one of the following symbols appended to the window name:
2218 .Bl -column "Symbol" "Meaning" -offset indent
2219 .It Sy "Symbol" Ta Sy "Meaning"
2220 .It Li "*" Ta "Denotes the current window."
2221 .It Li "-" Ta "Marks the last window (previously selected)."
2222 .It Li "#" Ta "Window is monitored and activity has been detected."
2223 .It Li "!" Ta "A bell has occurred in the window."
2224 .It Li "+" Ta "Window is monitored for content and it has appeared."
2227 The # symbol relates to the
2228 .Ic monitor-activity
2229 and + to the
2230 .Ic monitor-content
2231 window options.
2232 The window name is printed in inverted colours if an alert (bell, activity or
2233 content) is present.
2235 The colour and attributes of the status line may be configured, the entire
2236 status line using the
2237 .Ic status-attr ,
2238 .Ic status-fg
2240 .Ic status-bg
2241 session options and individual windows using the
2242 .Ic window-status-attr ,
2243 .Ic window-status-fg
2245 .Ic window-status-bg
2246 window options.
2248 The status line is automatically refreshed at interval if it has changed, the
2249 interval may be controlled with the
2250 .Ic status-interval
2251 session option.
2253 Commands related to the status line are as follows:
2254 .Bl -tag -width Ds
2255 .It Xo Ic command-prompt
2256 .Op Fl p Ar prompts
2257 .Op Fl t Ar target-client
2258 .Op Ar template
2260 Open the command prompt in a client.
2261 This may be used from inside
2263 to execute commands interactively.
2265 .Ar template
2266 is specified, it is used as the command.
2268 .Fl p
2269 is given,
2270 .Ar prompts
2271 is a comma-separated list of prompts which are displayed in order; otherwise
2272 a single prompt is displayed, constructed from
2273 .Ar template
2274 if it is present, or
2275 .Ql \&:
2276 if not.
2277 Before the command is executed, the first occurrence of the string
2278 .Ql %%
2279 and all occurrences of
2280 .Ql %1
2281 are replaced by the response to the first prompt, the second
2282 .Ql %%
2283 and all
2284 .Ql %2
2285 are replaced with the response to the second prompt, and so on for further
2286 prompts.
2287 Up to nine prompt responses may be replaced
2289 .Ql %1
2291 .Ql %9
2292 .Pc .
2293 .It Xo Ic confirm-before
2294 .Op Fl t Ar target-client
2295 .Ar command
2297 .D1 (alias: Ic confirm )
2298 Ask for confirmation before executing
2299 .Ar command .
2300 This command works only from inside
2301 .Nm .
2302 .It Xo Ic display-message
2303 .Op Fl p
2304 .Op Fl t Ar target-client
2305 .Op Ar message
2307 .D1 (alias: Ic display )
2308 Display a message.
2310 .Fl p
2311 is given, the output is printed to stdout, otherwise it is displayed in the
2312 .Ar target-client
2313 status line.
2314 The format of
2315 .Ar message
2316 is as for
2317 .Ic status-left ,
2318 with the exception that #() are not handled.
2320 .Sh BUFFERS
2322 maintains a stack of
2323 .Em paste buffers
2324 for each session.
2325 Up to the value of the
2326 .Ic buffer-limit
2327 option are kept; when a new buffer is added, the buffer at the bottom of the
2328 stack is removed.
2329 Buffers may be added using
2330 .Ic copy-mode
2331 or the
2332 .Ic set-buffer
2333 command, and pasted into a window using the
2334 .Ic paste-buffer
2335 command.
2337 A configurable history buffer is also maintained for each window.
2338 By default, up to 2000 lines are kept; this can be altered with the
2339 .Ic history-limit
2340 option (see the
2341 .Ic set-option
2342 command above).
2344 The buffer commands are as follows:
2345 .Bl -tag -width Ds
2346 .It Ic clear-history Op Fl t Ar target-pane
2347 .D1 (alias: Ic clearhist )
2348 Remove and free the history for the specified pane.
2349 .It Xo Ic copy-buffer
2350 .Op Fl a Ar src-index
2351 .Op Fl b Ar dst-index
2352 .Op Fl s Ar src-session
2353 .Op Fl t Ar dst-session
2355 .D1 (alias: Ic copyb )
2356 Copy a session paste buffer to another session.
2357 If no sessions are specified, the current one is used instead.
2358 .It Xo Ic delete-buffer
2359 .Op Fl b Ar buffer-index
2360 .Op Fl t Ar target-session
2362 .D1 (alias: Ic deleteb )
2363 Delete the buffer at
2364 .Ar buffer-index ,
2365 or the top buffer if not specified.
2366 .It Ic list-buffers Op Fl t Ar target-session
2367 .D1 (alias: Ic lsb )
2368 List the buffers in the given session.
2369 .It Xo Ic load-buffer
2370 .Op Fl b Ar buffer-index
2371 .Op Fl t Ar target-session
2372 .Ar path
2374 .D1 (alias: Ic loadb )
2375 Load the contents of the specified paste buffer from
2376 .Ar path .
2377 .It Xo Ic paste-buffer
2378 .Op Fl dr
2379 .Op Fl b Ar buffer-index
2380 .Op Fl t Ar target-pane
2382 .D1 (alias: Ic pasteb )
2383 Insert the contents of a paste buffer into the specified pane.
2384 If not specified, paste into the current one.
2385 With
2386 .Fl d ,
2387 also delete the paste buffer from the stack.
2388 When output, any linefeed (LF) characters in the paste buffer are replaced with
2389 carriage returns (CR).
2390 This translation may be disabled with the
2391 .Fl r
2392 flag.
2393 .It Xo Ic save-buffer
2394 .Op Fl a
2395 .Op Fl b Ar buffer-index
2396 .Op Fl t Ar target-session
2397 .Ar path
2399 .D1 (alias: Ic saveb )
2400 Save the contents of the specified paste buffer to
2401 .Ar path .
2403 .Fl a
2404 option appends to rather than overwriting the file.
2405 .It Xo Ic set-buffer
2406 .Op Fl b Ar buffer-index
2407 .Op Fl t Ar target-session
2408 .Ar data
2410 .D1 (alias: Ic setb )
2411 Set the contents of the specified buffer to
2412 .Ar data .
2413 .It Xo Ic show-buffer
2414 .Op Fl b Ar buffer-index
2415 .Op Fl t Ar target-session
2417 .D1 (alias: Ic showb )
2418 Display the contents of the specified buffer.
2420 .Sh MISCELLANEOUS
2422 Miscellaneous commands are as follows:
2423 .Bl -tag -width Ds
2424 .It Ic clock-mode Op Fl t Ar target-pane
2425 Display a large clock.
2426 .It Ic if-shell Ar shell-command command
2427 .D1 (alias: Ic if )
2428 Execute
2429 .Ar command
2431 .Ar shell-command
2432 returns success.
2433 .It Ic lock-server
2434 .D1 (alias: Ic lock )
2435 Lock each client individually by running the command specified by the
2436 .Ic lock-command
2437 option.
2438 .It Ic run-shell Ar shell-command
2439 .D1 (alias: Ic run )
2440 Execute
2441 .Ar shell-command
2442 in the background without creating a window.
2443 After it finishes, any output to stdout is displayed in copy mode.
2444 If the command doesn't return success, the exit status is also displayed.
2445 .It Ic server-info
2446 .D1 (alias: Ic info )
2447 Show server information and terminal details.
2449 .Sh FILES
2450 .Bl -tag -width "/etc/tmux.confXXX" -compact
2451 .It Pa ~/.tmux.conf
2452 Default
2454 configuration file.
2455 .It Pa /etc/tmux.conf
2456 System-wide configuration file.
2458 .Sh EXAMPLES
2459 To create a new
2461 session running
2462 .Xr vi 1 :
2464 .Dl $ tmux new-session vi
2466 Most commands have a shorter form, known as an alias.
2467 For new-session, this is
2468 .Ic new :
2470 .Dl $ tmux new vi
2472 Alternatively, the shortest unambiguous form of a command is accepted.
2473 If there are several options, they are listed:
2474 .Bd -literal -offset indent
2475 $ tmux n
2476 ambiguous command: n, could be: new-session, new-window, next-window
2479 Within an active session, a new window may be created by typing
2480 .Ql C-b c
2481 (Ctrl
2482 followed by the
2483 .Ql b
2485 followed by the
2486 .Ql c
2487 key).
2489 Windows may be navigated with:
2490 .Ql C-b 0
2491 (to select window 0),
2492 .Ql C-b 1
2493 (to select window 1), and so on;
2494 .Ql C-b n
2495 to select the next window; and
2496 .Ql C-b p
2497 to select the previous window.
2499 A session may be detached using
2500 .Ql C-b d
2501 (or by an external event such as
2502 .Xr ssh 1
2503 disconnection) and reattached with:
2505 .Dl $ tmux attach-session
2507 Typing
2508 .Ql C-b \&?
2509 lists the current key bindings in the current window; up and down may be used
2510 to navigate the list or
2511 .Ql q
2512 to exit from it.
2514 Commands to be run when the
2516 server is started may be placed in the
2517 .Pa ~/.tmux.conf
2518 configuration file.
2519 Common examples include:
2521 Changing the default prefix key:
2522 .Bd -literal -offset indent
2523 set-option -g prefix C-a
2524 unbind-key C-b
2525 bind-key C-a send-prefix
2528 Turning the status line off, or changing its colour:
2529 .Bd -literal -offset indent
2530 set-option -g status off
2531 set-option -g status-bg blue
2534 Setting other options, such as the default command,
2535 or locking after 30 minutes of inactivity:
2536 .Bd -literal -offset indent
2537 set-option -g default-command "exec /bin/ksh"
2538 set-option -g lock-after-time 1800
2541 Creating new key bindings:
2542 .Bd -literal -offset indent
2543 bind-key b set-option status
2544 bind-key / command-prompt "split-window 'exec man %%'"
2545 bind-key S command-prompt "new-window -n %1 'ssh %1'"
2547 .Sh SEE ALSO
2548 .Xr pty 4
2549 .Sh AUTHORS
2550 .An Nicholas Marriott Aq nicm@users.sourceforge.net