3 .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
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.
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.
22 .Nd terminal multiplexer
27 .Op Fl c Ar shell-command
29 .Op Fl L Ar socket-name
30 .Op Fl S Ar socket-path
31 .Op Ar command Op Ar flags
35 is a terminal multiplexer:
36 it enables a number of terminals to be created, accessed, and
37 controlled from a single screen.
39 may be detached from a screen
40 and continue running in the background,
41 then later reattached.
45 is started it creates a new
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.
54 A session is a single collection of
56 under the management of
58 Each session has one or more
60 A window occupies the entire screen
61 and may be split into rectangular panes,
62 each of which is a separate pseudo terminal
65 manual page documents the technical details of pseudo terminals).
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,
74 Each session is persistent and will survive accidental disconnection
77 connection timeout) or intentional detaching (with the
81 may be reattached using:
87 a session is displayed on screen by a
89 and all sessions are managed by a single
91 The server and each client are separate processes which communicate through a
95 The options are as follows:
96 .Bl -tag -width "XXXXXXXXXXXX"
100 to assume the terminal supports 256 colours.
102 Start in control mode (see the
108 .It Fl c Ar shell-command
111 using the default shell.
114 server will be started to retrieve the
117 This option is for compatibility with
121 is used as a login shell.
123 Specify an alternative configuration file.
126 loads the system configuration file from
128 if present, then looks for a user configuration file at
131 The configuration file is a set of
133 commands which are executed in sequence when the server is first started.
135 loads configuration files once when the server process has started.
138 command may be used to load a file later.
141 shows any error messages from commands in configuration files in the first
142 session created, and continues to process the rest of the configuration file.
143 .It Fl L Ar socket-name
145 stores the server socket in a directory under
151 The default socket is named
153 This option allows a different socket name to be specified, allowing several
159 a full path is not necessary: the sockets are all created in the same
162 If the socket is accidentally removed, the
164 signal may be sent to the
166 server process to recreate it.
168 Behave as a login shell.
169 This flag currently has no effect and is for compatibility with other shells
170 when using tmux as a login shell.
174 server option to prevent the server sending various informational messages.
175 .It Fl S Ar socket-path
176 Specify a full alternative path to the server socket.
179 is specified, the default socket directory is not used and any
184 attempts to guess if the terminal is likely to support UTF-8 by checking the
190 environment variables to be set for the string "UTF-8".
191 This is not always correct: the
193 flag explicitly informs
195 that UTF-8 is supported.
197 If the server is started from a client passed
199 or where UTF-8 is detected, the
203 options are enabled in the global window and session options respectively.
205 Request verbose logging.
206 This option may be specified multiple times for increasing verbosity.
207 Log messages will be saved into
208 .Pa tmux-client-PID.log
210 .Pa tmux-server-PID.log
211 files in the current directory, where
213 is the PID of the server or client process.
214 .It Ar command Op Ar flags
215 This specifies one of a set of commands used to control
217 as described in the following sections.
218 If no commands are specified, the
224 may be controlled from an attached client by using a key combination of a
227 (Ctrl-b) by default, followed by a command key.
229 The default command key bindings are:
231 .Bl -tag -width "XXXXXXXXXX" -offset indent -compact
233 Send the prefix key (C-b) through to the application.
235 Rotate the panes in the current window forwards.
241 Break the current pane out of the window.
243 Split the current pane into two, top and bottom.
245 List all paste buffers.
247 Rename the current session.
249 Split the current pane into two, left and right.
251 Kill the current window.
253 Prompt for a window index to select.
255 Rename the current window.
257 Delete the most recently copied buffer of text.
259 Prompt for an index to move the current window.
261 Select windows 0 to 9.
267 Move to the previously active pane.
269 Choose which buffer to paste interactively from a list.
271 List all key bindings.
273 Choose a client to detach.
275 Enter copy mode to copy text or view the history.
277 Paste the most recently copied buffer of text.
281 Detach the current client.
283 Prompt to search for text in open windows.
285 Display some information about the current window.
287 Move to the previously selected window.
289 Change to the next window.
291 Select the next pane in the current window.
293 Change to the previous window.
295 Briefly display pane indexes.
297 Force redraw of the attached client.
299 Select a new session for the attached client interactively.
301 Switch the attached client back to the last session.
305 Choose the current window interactively.
307 Kill the current pane.
309 Swap the current pane with the previous pane.
311 Swap the current pane with the next pane.
313 Show previous messages from
317 Enter copy mode and scroll one page up.
320 Change to the pane above, below, to the left, or to the right of the current
323 Arrange panes in one of the five preset layouts: even-horizontal,
324 even-vertical, main-horizontal, main-vertical, or tiled.
326 Move to the next window with a bell or activity marker.
328 Rotate the panes in the current window backwards.
330 Move to the previous window with a bell or activity marker.
333 Resize the current pane in steps of one cell.
336 Resize the current pane in steps of five cells.
339 Key bindings may be changed with the
345 This section contains a list of the commands supported by
347 Most commands accept the optional
355 These specify the client, session, window or pane which a command should affect.
359 file to which the client is connected, for example either of
363 for the client attached to
365 If no client is specified, the current client is chosen, if possible, or an
367 Clients may be listed with the
372 is the session id prefixed with a $, the name of a session (as listed by the
374 command), or the name of a client with the same syntax as
376 in which case the session attached to the client is used.
377 When looking for the session name,
379 initially searches for an exact match; if none is found, the session names
380 are checked for any for which
382 is a prefix or for which it matches as an
385 If a single match is found, it is used as the target session; multiple matches
387 If a session is omitted, the current session is used if available; if no
388 current session is available, the most recently used is chosen.
391 specifies a window in the form
392 .Em session Ns \&: Ns Em window .
394 follows the same rules as for
398 is looked for in order: as a window index, for example mysession:1;
399 as a window ID, such as @1;
400 as an exact window name, such as mysession:mywindow; then as an
402 pattern or the start of a window name, such as mysession:mywin* or
404 An empty window name specifies the next unused index if appropriate (for
410 otherwise the current window in
413 The special character
415 uses the last (previously current) window,
417 selects the highest numbered window,
419 selects the lowest numbered window, and
423 select the next window or the previous window by number.
424 When the argument does not contain a colon,
426 first attempts to parse it as window; if that fails, an attempt is made to
430 takes a similar form to
432 but with the optional addition of a period followed by a pane index, for
433 example: mysession:mywindow.1.
434 If the pane index is omitted, the currently active pane in the specified
436 If neither a colon nor period appears,
438 first attempts to use the argument as a pane index; if that fails, it is looked
445 indicate the next or previous pane index, respectively.
456 may be used instead of a pane index.
458 The special characters
462 may be followed by an offset, for example:
463 .Bd -literal -offset indent
467 When dealing with a session that doesn't contain sequential window indexes,
468 they will be correctly skipped.
471 also gives each pane created in a server an identifier consisting of a
473 and a number, starting from zero.
474 A pane's identifier is unique for the life of the
476 server and is passed to the child process of the pane in the
478 environment variable.
479 It may be used alone to target a pane or the window containing it.
485 These must be passed as a single item, which typically means quoting them, for
487 .Bd -literal -offset indent
488 new-window 'vi /etc/passwd'
495 command, passed with the command and arguments separately, for example:
496 .Bd -literal -offset indent
497 bind-key F1 set-window-option force-width 81
502 .Bd -literal -offset indent
503 $ tmux bind-key F1 set-window-option force-width 81
506 Multiple commands may be specified together as part of a
507 .Em command sequence .
508 Each command should be separated by spaces and a semicolon;
509 commands are executed sequentially from left to right and
510 lines ending with a backslash continue on to the next line,
511 except when escaped by another backslash.
512 A literal semicolon may be included by escaping it with a backslash (for
513 example, when specifying a command sequence to
519 .Bd -literal -offset indent
520 refresh-client -t/dev/ttyp2
522 rename-session -tfirst newname
524 set-window-option -t:0 monitor-activity on
526 new-window ; split-window -d
528 bind-key R source-file ~/.tmux.conf \e; \e
529 display-message "source-file done"
534 .Bd -literal -offset indent
535 $ tmux kill-window -t :1
537 $ tmux new-window \e; split-window -d
539 $ tmux new-session -d 'vi /etc/passwd' \e; split-window -d \e; attach
541 .Sh CLIENTS AND SESSIONS
544 server manages clients, sessions, windows and panes.
545 Clients are attached to sessions to interact with them, either
546 when they are created with the
548 command, or later with the
551 Each session has one or more windows
554 Windows may be linked to multiple sessions and are made up of one or
556 each of which contains a pseudo terminal.
557 Commands for creating, linking and otherwise manipulating windows
560 .Sx WINDOWS AND PANES
563 The following commands are available to manage clients and sessions:
565 .It Xo Ic attach-session
567 .Op Fl c Ar working-directory
568 .Op Fl t Ar target-session
570 .D1 (alias: Ic attach )
573 create a new client in the current terminal and attach it to
575 If used from inside, switch the current client.
578 is specified, any other clients attached to the session are detached.
580 signifies the client is read-only (only keys bound to the
584 commands have any effect)
586 If no server is started,
588 will attempt to start it; this will fail unless sessions are created in the
595 are slightly adjusted: if
597 needs to select the most recently used session, it will prefer the most
603 will set the session working directory (used for new windows) to
604 .Ar working-directory .
605 .It Xo Ic detach-client
608 .Op Fl s Ar target-session
609 .Op Fl t Ar target-client
611 .D1 (alias: Ic detach )
612 Detach the current client if bound to a key, the client specified with
614 or all clients currently attached to the session specified by
618 option kills all but the client given with
622 is given, send SIGHUP to the parent process of the client, typically causing it
624 .It Ic has-session Op Fl t Ar target-session
626 Report an error and exit with 1 if the specified session does not exist.
627 If it does exist, exit with 0.
631 server and clients and destroy all sessions.
632 .It Xo Ic kill-session
634 .Op Fl t Ar target-session
636 Destroy the given session, closing any windows linked to it and no other
637 sessions, and detaching all clients attached to it.
640 is given, all sessions but the specified one is killed.
641 .It Xo Ic list-clients
643 .Op Fl t Ar target-session
646 List all clients attached to the server.
647 For the meaning of the
654 is specified, list only clients connected to that session.
656 .D1 (alias: Ic lscm )
657 List the syntax of all commands supported by
659 .It Ic list-sessions Op Fl F Ar format
661 List all sessions managed by the server.
662 For the meaning of the
667 .It Ic lock-client Op Fl t Ar target-client
668 .D1 (alias: Ic lockc )
674 .It Ic lock-session Op Fl t Ar target-session
675 .D1 (alias: Ic locks )
676 Lock all clients attached to
678 .It Xo Ic new-session
680 .Op Fl c Ar start-directory
682 .Op Fl n Ar window-name
683 .Op Fl s Ar session-name
684 .Op Fl t Ar target-session
690 Create a new session with name
693 The new session is attached to the current terminal unless
699 are the name of and shell command to execute in the initial window.
706 specify the size of the initial window (80 by 24 if not given).
708 If run from a terminal, any
710 special characters are saved and used for new windows in the new session.
720 already exists; in the case,
729 is given, the new session is
733 This means they share the same set of windows - all windows from
735 are linked to the new session and any subsequent new windows or windows being
736 closed are applied to both sessions.
737 The current and previous window and any session options remain independent and
738 either session may be killed without affecting the other.
749 option prints information about the new session after it has been created.
750 By default, it uses the format
752 but a different format may be specified with
754 .It Xo Ic refresh-client
756 .Op Fl t Ar target-client
758 .D1 (alias: Ic refresh )
759 Refresh the current client if bound to a key, or a single client if one is given
764 is specified, only update the client's status bar.
765 .It Xo Ic rename-session
766 .Op Fl t Ar target-session
769 .D1 (alias: Ic rename )
770 Rename the session to
772 .It Xo Ic show-messages
773 .Op Fl t Ar target-client
775 .D1 (alias: Ic showmsgs )
776 Any messages displayed on the status line are saved in a per-client message
777 log, up to a maximum of the limit set by the
779 session option for the session attached to that client.
780 This command displays the log for
782 .It Ic source-file Ar path
783 .D1 (alias: Ic source )
784 Execute commands from
787 .D1 (alias: Ic start )
790 server, if not already running, without creating any sessions.
791 .It Xo Ic suspend-client
792 .Op Fl t Ar target-client
794 .D1 (alias: Ic suspendc )
795 Suspend a client by sending
798 .It Xo Ic switch-client
800 .Op Fl c Ar target-client
801 .Op Fl t Ar target-session
803 .D1 (alias: Ic switchc )
804 Switch the current session for client
813 is used, the client is moved to the last, next or previous session
816 toggles whether a client is read-only (see the
820 .Sh WINDOWS AND PANES
823 window may be in one of several modes.
824 The default permits direct access to the terminal attached to the window.
825 The other is copy mode, which permits a section of a window or its
826 history to be copied to a
828 for later insertion into another window.
829 This mode is entered with the
834 It is also entered when a command that produces output, such as
836 is executed from a key binding.
838 The keys available depend on whether emacs or vi mode is selected
842 The following keys are supported as appropriate for the mode:
843 .Bl -column "FunctionXXXXXXXXXXXXXXXXX" "viXXXXXXXXXX" "emacs" -offset indent
844 .It Sy "Function" Ta Sy "vi" Ta Sy "emacs"
845 .It Li "Back to indentation" Ta "^" Ta "M-m"
846 .It Li "Bottom of history" Ta "G" Ta "M-<"
847 .It Li "Clear selection" Ta "Escape" Ta "C-g"
848 .It Li "Copy selection" Ta "Enter" Ta "M-w"
849 .It Li "Cursor down" Ta "j" Ta "Down"
850 .It Li "Cursor left" Ta "h" Ta "Left"
851 .It Li "Cursor right" Ta "l" Ta "Right"
852 .It Li "Cursor to bottom line" Ta "L" Ta ""
853 .It Li "Cursor to middle line" Ta "M" Ta "M-r"
854 .It Li "Cursor to top line" Ta "H" Ta "M-R"
855 .It Li "Cursor up" Ta "k" Ta "Up"
856 .It Li "Delete entire line" Ta "d" Ta "C-u"
857 .It Li "Delete/Copy to end of line" Ta "D" Ta "C-k"
858 .It Li "End of line" Ta "$" Ta "C-e"
859 .It Li "Go to line" Ta ":" Ta "g"
860 .It Li "Half page down" Ta "C-d" Ta "M-Down"
861 .It Li "Half page up" Ta "C-u" Ta "M-Up"
862 .It Li "Jump forward" Ta "f" Ta "f"
863 .It Li "Jump to forward" Ta "t" Ta ""
864 .It Li "Jump backward" Ta "F" Ta "F"
865 .It Li "Jump to backward" Ta "T" Ta ""
866 .It Li "Jump again" Ta ";" Ta ";"
867 .It Li "Jump again in reverse" Ta "," Ta ","
868 .It Li "Next page" Ta "C-f" Ta "Page down"
869 .It Li "Next space" Ta "W" Ta ""
870 .It Li "Next space, end of word" Ta "E" Ta ""
871 .It Li "Next word" Ta "w" Ta ""
872 .It Li "Next word end" Ta "e" Ta "M-f"
873 .It Li "Other end of selection" Ta "o" Ta ""
874 .It Li "Paste buffer" Ta "p" Ta "C-y"
875 .It Li "Previous page" Ta "C-b" Ta "Page up"
876 .It Li "Previous word" Ta "b" Ta "M-b"
877 .It Li "Previous space" Ta "B" Ta ""
878 .It Li "Quit mode" Ta "q" Ta "Escape"
879 .It Li "Rectangle toggle" Ta "v" Ta "R"
880 .It Li "Scroll down" Ta "C-Down or C-e" Ta "C-Down"
881 .It Li "Scroll up" Ta "C-Up or C-y" Ta "C-Up"
882 .It Li "Search again" Ta "n" Ta "n"
883 .It Li "Search again in reverse" Ta "N" Ta "N"
884 .It Li "Search backward" Ta "?" Ta "C-r"
885 .It Li "Search forward" Ta "/" Ta "C-s"
886 .It Li "Start of line" Ta "0" Ta "C-a"
887 .It Li "Start selection" Ta "Space" Ta "C-Space"
888 .It Li "Top of history" Ta "g" Ta "M->"
889 .It Li "Transpose characters" Ta "" Ta "C-t"
892 The next and previous word keys use space and the
897 characters as word delimiters by default, but this can be adjusted by
901 Next word moves to the start of the next word, next word end to the end of the
902 next word and previous word to the start of the previous word.
903 The three next and previous space keys work similarly but use a space alone as
906 The jump commands enable quick movement within a line.
911 will move the cursor to the next
913 character on the current line.
916 will then jump to the next occurrence.
918 Commands in copy mode may be prefaced by an optional repeat count.
919 With vi key bindings, a prefix is entered using the number keys; with
920 emacs, the Alt (meta) key and a number begins prefix entry.
921 For example, to move the cursor forward by ten words, use
927 When copying the selection, the repeat count indicates the buffer index to
930 Mode key bindings are defined in a set of named tables:
934 for keys used when line editing at the command prompt;
938 for keys used when choosing from lists (such as produced by the
945 The tables may be viewed with the
947 command and keys modified or removed with
951 One command accepts an argument,
953 which copies the selection and pipes it to a command.
954 For example the following will bind
956 to copy the selection into
958 as well as the paste buffer:
959 .Bd -literal -offset indent
960 bind-key -temacs-copy C-q copy-pipe "cat >/tmp/out"
963 The paste buffer key pastes the first line from the top paste buffer on the
972 .Op Fl t Ar target-pane
977 option scrolls one page up.
980 Each window displayed by
982 may be split into one or more
984 each pane takes up a certain area of the display and is a separate terminal.
985 A window may be split into panes using the
988 Windows may be split horizontally (with the
991 Panes may be resized with the
999 by default), the current pane may be changed with the
1005 commands may be used to swap panes without changing their position.
1006 Panes are numbered beginning from zero in the order they are created.
1011 These may be selected with the
1013 command or cycled with
1017 by default); once a layout is chosen, panes within it may be moved and resized
1020 The following layouts are supported:
1022 .It Ic even-horizontal
1023 Panes are spread out evenly from left to right across the window.
1024 .It Ic even-vertical
1025 Panes are spread evenly from top to bottom.
1026 .It Ic main-horizontal
1027 A large (main) pane is shown at the top of the window and the remaining panes
1028 are spread from left to right in the leftover space at the bottom.
1030 .Em main-pane-height
1031 window option to specify the height of the top pane.
1032 .It Ic main-vertical
1035 but the large pane is placed on the left and the others spread from top to
1036 bottom along the right.
1041 Panes are spread out as evenly as possible over the window in both rows and
1047 may be used to apply a previously used layout - the
1049 command displays the layout of each window in a form suitable for use with
1052 .Bd -literal -offset indent
1055 layout: bb62,159x48,0,0{79x48,0,0,79x48,80,0}
1056 $ tmux select-layout bb62,159x48,0,0{79x48,0,0,79x48,80,0}
1060 automatically adjusts the size of the layout for the current window size.
1061 Note that a layout cannot be applied to a window with more panes than that
1062 from which the layout was originally defined.
1064 Commands related to windows and panes are as follows:
1066 .It Xo Ic break-pane
1069 .Op Fl t Ar target-pane
1071 .D1 (alias: Ic breakp )
1074 off from its containing window to make it the only pane in a new window.
1077 is given, the new window does not become the current window.
1080 option prints information about the new window after it has been created.
1081 By default, it uses the format
1082 .Ql #{session_name}:#{window_index}
1083 but a different format may be specified with
1085 .It Xo Ic capture-pane
1087 .Op Fl b Ar buffer-index
1088 .Op Fl E Ar end-line
1089 .Op Fl S Ar start-line
1090 .Op Fl t Ar target-pane
1092 .D1 (alias: Ic capturep )
1093 Capture the contents of a pane.
1096 is given, the output goes to stdout, otherwise to the buffer specified with
1098 or a new buffer if omitted.
1101 is given, the alternate screen is used, and the history is not accessible.
1102 If no alternate screen exists, an error will be returned unless
1107 is given, the output includes escape sequences for text and background
1110 also escapes non-printable characters as octal \exxx.
1112 joins wrapped lines and preserves trailing spaces at each line's end.
1114 captures only any output that the pane has received that is the beginning of an
1115 as-yet incomplete escape sequence.
1120 specify the starting and ending line numbers, zero is the first line of the
1121 visible pane and negative numbers are lines in the history.
1122 The default is to capture only the visible contents of the pane.
1126 .Op Fl t Ar target-window
1129 Put a window into client choice mode, allowing a client to be selected
1130 interactively from a list.
1131 After a client is chosen,
1133 is replaced by the client
1137 and the result executed as a command.
1140 is not given, "detach-client -t '%%'" is used.
1141 For the meaning of the
1146 This command works only if at least one client is attached.
1150 .Op Fl t Ar target-window
1153 Put a window into list choice mode, allowing
1157 can be a comma-separated list to display more than one item.
1158 If an item has spaces, that entry must be quoted.
1159 After an item is chosen,
1161 is replaced by the chosen item in the
1163 and the result is executed as a command.
1166 is not given, "run-shell '%%'" is used.
1168 also accepts format specifiers.
1169 For the meaning of this see the
1172 This command works only if at least one client is attached.
1176 .Op Fl t Ar target-window
1179 Put a window into session choice mode, where a session may be selected
1180 interactively from a list.
1183 is replaced by the session name in
1185 and the result executed as a command.
1188 is not given, "switch-client -t '%%'" is used.
1189 For the meaning of the
1194 This command works only if at least one client is attached.
1198 .Op Fl b Ar session-template
1199 .Op Fl c Ar window-template
1202 .Op Fl t Ar target-window
1204 Put a window into tree choice mode, where either sessions or windows may be
1205 selected interactively from a list.
1206 By default, windows belonging to a session are indented to show their
1207 relationship to a session.
1213 commands are wrappers around
1218 is given, will show sessions.
1221 is given, will show windows.
1223 By default, the tree is collapsed and sessions must be expanded to windows
1224 with the right arrow key.
1227 option will start with all sessions expanded instead.
1231 is given, will override the default session command.
1234 can be used and will be replaced with the session name.
1235 The default option if not specified is "switch-client -t '%%'".
1238 is given, will override the default window command.
1242 can be used and will be replaced with the session name and window index.
1243 When a window is chosen from the list, the session command is run before the
1248 is given will display the specified format instead of the default session
1252 is given will display the specified format instead of the default window
1254 For the meaning of the
1262 This command works only if at least one client is attached.
1266 .Op Fl t Ar target-window
1269 Put a window into window choice mode, where a window may be chosen
1270 interactively from a list.
1271 After a window is selected,
1273 is replaced by the session name and window index in
1275 and the result executed as a command.
1278 is not given, "select-window -t '%%'" is used.
1279 For the meaning of the
1284 This command works only if at least one client is attached.
1285 .It Ic display-panes Op Fl t Ar target-client
1286 .D1 (alias: Ic displayp)
1287 Display a visible indicator of each pane shown by
1290 .Ic display-panes-time ,
1291 .Ic display-panes-colour ,
1293 .Ic display-panes-active-colour
1295 While the indicator is on screen, a pane may be selected with the
1300 .It Xo Ic find-window
1303 .Op Fl t Ar target-window
1306 .D1 (alias: Ic findw )
1311 in window names, titles, and visible content (but not history).
1312 The flags control matching behavior:
1314 matches only visible window contents,
1316 matches only the window name and
1318 matches only the window title.
1321 If only one window is matched, it'll be automatically selected,
1322 otherwise a choice list is shown.
1323 For the meaning of the
1328 This command works only if at least one client is attached.
1333 .Fl p Ar percentage Oc
1334 .Op Fl s Ar src-pane
1335 .Op Fl t Ar dst-pane
1337 .D1 (alias: Ic joinp )
1340 but instead of splitting
1342 and creating a new pane, split it and move
1345 This can be used to reverse
1351 to be joined to left of or above
1355 .Op Fl t Ar target-pane
1357 .D1 (alias: Ic killp )
1358 Destroy the given pane.
1359 If no panes remain in the containing window, it is also destroyed.
1362 option kills all but the pane given with
1364 .It Xo Ic kill-window
1366 .Op Fl t Ar target-window
1368 .D1 (alias: Ic killw )
1369 Kill the current window or the window at
1371 removing it from any sessions to which it is linked.
1374 option kills all but the window given with
1376 .It Ic last-pane Op Fl t Ar target-window
1377 .D1 (alias: Ic lastp )
1378 Select the last (previously selected) pane.
1379 .It Ic last-window Op Fl t Ar target-session
1380 .D1 (alias: Ic last )
1381 Select the last (previously selected) window.
1384 is specified, select the last window of the current session.
1385 .It Xo Ic link-window
1387 .Op Fl s Ar src-window
1388 .Op Fl t Ar dst-window
1390 .D1 (alias: Ic linkw )
1397 is specified and no such window exists, the
1404 exists, it is killed, otherwise an error is generated.
1407 is given, the newly linked window is not selected.
1408 .It Xo Ic list-panes
1413 .D1 (alias: Ic lsp )
1418 is ignored and all panes on the server are listed.
1423 is a session (or the current session).
1424 If neither is given,
1426 is a window (or the current window).
1427 For the meaning of the
1432 .It Xo Ic list-windows
1435 .Op Fl t Ar target-session
1437 .D1 (alias: Ic lsw )
1440 is given, list all windows on the server.
1441 Otherwise, list windows in the current session or in
1442 .Ar target-session .
1443 For the meaning of the
1452 .Fl p Ar percentage Oc
1453 .Op Fl s Ar src-pane
1454 .Op Fl t Ar dst-pane
1456 .D1 (alias: Ic movep )
1463 may belong to the same window.
1464 .It Xo Ic move-window
1466 .Op Fl s Ar src-window
1467 .Op Fl t Ar dst-window
1469 .D1 (alias: Ic movew )
1472 except the window at
1478 all windows in the session are renumbered in sequential order, respecting
1482 .It Xo Ic new-window
1484 .Op Fl c Ar start-directory
1486 .Op Fl n Ar window-name
1487 .Op Fl t Ar target-window
1488 .Op Ar shell-command
1490 .D1 (alias: Ic neww )
1491 Create a new window.
1494 the new window is inserted at the next index up from the specified
1496 moving windows up if necessary,
1499 is the new window location.
1503 is given, the session does not make the new window the current window.
1505 represents the window to be created; if the target already exists an error is
1508 flag is used, in which case it is destroyed.
1510 is the command to execute.
1513 is not specified, the value of the
1517 specifies the working directory in which the new window is created.
1519 When the shell command completes, the window closes.
1522 option to change this behaviour.
1526 environment variable must be set to
1528 for all programs running
1531 New windows will automatically have
1533 added to their environment, but care must be taken not to reset this in shell
1538 option prints information about the new window after it has been created.
1539 By default, it uses the format
1540 .Ql #{session_name}:#{window_index}
1541 but a different format may be specified with
1543 .It Ic next-layout Op Fl t Ar target-window
1544 .D1 (alias: Ic nextl )
1545 Move a window to the next layout and rearrange the panes to fit.
1546 .It Xo Ic next-window
1548 .Op Fl t Ar target-session
1550 .D1 (alias: Ic next )
1551 Move to the next window in the session.
1554 is used, move to the next window with an alert.
1557 .Op Fl t Ar target-pane
1558 .Op Ar shell-command
1560 .D1 (alias: Ic pipep )
1561 Pipe any output sent by the program in
1564 A pane may only be piped to one command at a time, any existing pipe is
1570 string may contain the special character sequences supported by the
1575 is given, the current pipe (if any) is closed.
1579 option only opens a new pipe if no previous pipe exists, allowing a pipe to
1580 be toggled with a single key, for example:
1581 .Bd -literal -offset indent
1582 bind-key C-p pipe-pane -o 'cat >>~/output.#I-#P'
1584 .It Xo Ic previous-layout
1585 .Op Fl t Ar target-window
1587 .D1 (alias: Ic prevl )
1588 Move to the previous layout in the session.
1589 .It Xo Ic previous-window
1591 .Op Fl t Ar target-session
1593 .D1 (alias: Ic prev )
1594 Move to the previous window in the session.
1597 move to the previous window with an alert.
1598 .It Xo Ic rename-window
1599 .Op Fl t Ar target-window
1602 .D1 (alias: Ic renamew )
1603 Rename the current window, or the window at
1607 .It Xo Ic resize-pane
1609 .Op Fl t Ar target-pane
1614 .D1 (alias: Ic resizep )
1615 Resize a pane, up, down, left or right by
1631 is given in lines or cells (the default is 1).
1635 the active pane is toggled between zoomed (occupying the whole of the window)
1636 and unzoomed (its normal position in the layout).
1637 .It Xo Ic respawn-pane
1639 .Op Fl t Ar target-pane
1640 .Op Ar shell-command
1642 .D1 (alias: Ic respawnp )
1643 Reactivate a pane in which the command has exited (see the
1648 is not given, the command used when the pane was created is executed.
1649 The pane must be already inactive, unless
1651 is given, in which case any existing command is killed.
1652 .It Xo Ic respawn-window
1654 .Op Fl t Ar target-window
1655 .Op Ar shell-command
1657 .D1 (alias: Ic respawnw )
1658 Reactivate a window in which the command has exited (see the
1663 is not given, the command used when the window was created is executed.
1664 The window must be already inactive, unless
1666 is given, in which case any existing command is killed.
1667 .It Xo Ic rotate-window
1669 .Op Fl t Ar target-window
1671 .D1 (alias: Ic rotatew )
1672 Rotate the positions of the panes within a window, either upward (numerically
1675 or downward (numerically higher).
1676 .It Xo Ic select-layout
1678 .Op Fl t Ar target-window
1681 .D1 (alias: Ic selectl )
1682 Choose a specific layout for a window.
1685 is not given, the last preset layout used (if any) is reapplied.
1689 are equivalent to the
1694 .It Xo Ic select-pane
1696 .Op Fl t Ar target-pane
1698 .D1 (alias: Ic selectp )
1701 the active pane in window
1709 is used, respectively the pane below, to the left, to the right, or above the
1710 target pane is used.
1712 is the same as using the
1715 .It Xo Ic select-window
1717 .Op Fl t Ar target-window
1719 .D1 (alias: Ic selectw )
1720 Select the window at
1726 are equivalent to the
1734 is given and the selected window is already the current window,
1735 the command behaves like
1737 .It Xo Ic split-window
1739 .Op Fl c Ar start-directory
1742 .Fl p Ar percentage Oc
1743 .Op Fl t Ar target-pane
1744 .Op Ar shell-command
1747 .D1 (alias: Ic splitw )
1748 Create a new pane by splitting
1751 does a horizontal split and
1753 a vertical split; if neither is specified,
1760 options specify the size of the new pane in lines (for vertical split) or in
1761 cells (for horizontal split), or as a percentage, respectively.
1762 All other options have the same meaning as for the
1767 .Op Fl s Ar src-pane
1768 .Op Fl t Ar dst-pane
1770 .D1 (alias: Ic swapp )
1774 is used and no source pane is specified with
1777 is swapped with the previous pane (before it numerically);
1779 swaps with the next pane (after it numerically).
1783 not to change the active pane.
1784 .It Xo Ic swap-window
1786 .Op Fl s Ar src-window
1787 .Op Fl t Ar dst-window
1789 .D1 (alias: Ic swapw )
1792 except the source and destination windows are swapped.
1793 It is an error if no window exists at
1795 .It Xo Ic unlink-window
1797 .Op Fl t Ar target-window
1799 .D1 (alias: Ic unlinkw )
1804 is given, a window may be unlinked only if it is linked to multiple sessions -
1805 windows may not be linked to no sessions;
1808 is specified and the window is linked to only one session, it is unlinked and
1813 allows a command to be bound to most keys, with or without a prefix key.
1814 When specifying keys, most represent themselves (for example
1818 Ctrl keys may be prefixed with
1824 In addition, the following special key names are accepted:
1842 .Em NPage/PageDown/PgDn ,
1843 .Em PPage/PageUp/PgUp ,
1847 Note that to bind the
1851 keys, quotation marks are necessary, for example:
1852 .Bd -literal -offset indent
1853 bind-key '"' split-window
1854 bind-key "'" new-window
1857 Commands related to key bindings are as follows:
1861 .Op Fl t Ar key-table
1862 .Ar key Ar command Op Ar arguments
1864 .D1 (alias: Ic bind )
1871 the primary key bindings are modified (those normally activated with the prefix
1872 key); in this case, if
1874 is specified, it is not necessary to use the prefix key,
1881 flag indicates this key may repeat, see the
1891 the binding for command mode with
1893 or for normal mode without.
1894 To view the default bindings and possible commands, see the
1897 .It Ic list-keys Op Fl t Ar key-table
1898 .D1 (alias: Ic lsk )
1899 List all key bindings.
1902 the primary key bindings - those executed when preceded by the prefix key -
1909 are listed; this may be one of:
1919 .Op Fl t Ar target-pane
1922 .D1 (alias: Ic send )
1923 Send a key or keys to a window.
1926 is the name of the key (such as
1930 ) to send; if the string is not recognised as a key, it is sent as a series of
1934 flag disables key name lookup and sends the keys literally.
1935 All arguments are sent sequentially from first to last.
1938 flag causes the terminal state to be reset.
1939 .It Xo Ic send-prefix
1941 .Op Fl t Ar target-pane
1943 Send the prefix key, or with
1945 the secondary prefix key, to a window as if it was pressed.
1946 .It Xo Ic unbind-key
1948 .Op Fl t Ar key-table
1951 .D1 (alias: Ic unbind )
1952 Unbind the command bound to
1956 the primary key bindings are modified; in this case, if
1958 is specified, the command bound to
1960 without a prefix (if any) is removed.
1963 is present, all key bindings are removed.
1971 is unbound: the binding for command mode with
1973 or for normal mode without.
1976 The appearance and behaviour of
1978 may be modified by changing the value of various options.
1979 There are three types of option:
1980 .Em server options ,
1983 .Em window options .
1987 server has a set of global options which do not apply to any particular
1989 These are altered with the
1992 command, or displayed with the
1997 In addition, each individual session may have a set of session options, and
1998 there is a separate set of global session options.
1999 Sessions which do not have a particular option configured inherit the value
2000 from the global session options.
2001 Session options are set or unset with the
2003 command and may be listed with the
2006 The available server and session options are listed under the
2010 Similarly, a set of window options is attached to each window, and there is
2011 a set of global window options from which any unset options are inherited.
2012 Window options are altered with the
2013 .Ic set-window-option
2014 command and can be listed with the
2015 .Ic show-window-options
2017 All window options are documented with the
2018 .Ic set-window-option
2022 also supports user options which are prefixed with a
2024 User options may have any name, so long as they are prefixed with
2026 and be set to any string.
2028 .Bd -literal -offset indent
2029 $ tmux setw -q @foo "abc123"
2030 $ tmux showw -v @foo
2034 Commands which set options are as follows:
2036 .It Xo Ic set-option
2038 .Op Fl t Ar target-session | Ar target-window
2041 .D1 (alias: Ic set )
2042 Set a window option with
2045 .Ic set-window-option
2047 a server option with
2049 otherwise a session option.
2053 is specified, the global session or window option is set.
2056 and if the option expects a string,
2058 is appended to the existing setting.
2061 flag unsets an option, so a session inherits the option from the global
2063 It is not possible to unset a global option.
2067 flag prevents setting an option that is already set.
2071 flag suppresses the informational message (as if the
2073 server option was set).
2075 Available window options are listed under
2076 .Ic set-window-option .
2079 depends on the option and may be a number, a string, or a flag (on, off, or
2082 Available server options are:
2084 .It Ic buffer-limit Ar number
2085 Set the number of buffers; as new buffers are added to the top of the stack,
2086 old ones are removed from the bottom if necessary to maintain this maximum
2088 .It Ic escape-time Ar time
2089 Set the time in milliseconds for which
2091 waits after an escape is input to determine if it is part of a function or meta
2093 The default is 500 milliseconds.
2094 .It Xo Ic exit-unattached
2097 If enabled, the server will exit when there are no attached clients.
2098 .It Xo Ic focus-events
2101 When enabled, focus events are requested from the terminal if supported and
2102 passed through to applications running in
2104 Attached clients should be detached and attached again after changing this
2109 Enable or disable the display of various informational messages (see also the
2112 .It Xo Ic set-clipboard
2115 Attempt to set the terminal clipboard content using the
2119 This option is on by default if there is an
2123 description for the client terminal.
2124 Note that this feature needs to be enabled in
2126 by setting the resource:
2127 .Bd -literal -offset indent
2128 disallowedWindowOps: 20,21,SetXprop
2131 Or changing this property from the
2133 interactive menu when required.
2136 Available session options are:
2138 .It Ic assume-paste-time Ar milliseconds
2139 If keys are entered faster than one in
2141 they are assumed to have been pasted rather than typed and
2143 key bindings are not processed.
2144 The default is one millisecond and zero disables.
2145 .It Ic base-index Ar index
2146 Set the base index from which an unused index should be searched when a new
2148 The default is zero.
2149 .It Xo Ic bell-action
2150 .Op Ic any | none | current
2152 Set action on window bell.
2154 means a bell in any window linked to a session causes a bell in the current
2155 window of that session,
2157 means all bells are ignored and
2159 means only bells in windows other than the current window are ignored.
2160 .It Xo Ic bell-on-alert
2163 If on, ring the terminal bell when an alert
2165 .It Ic default-command Ar shell-command
2166 Set the command used for new windows (if not specified when the window is
2172 The default is an empty string, which instructs
2174 to create a login shell using the value of the
2177 .It Ic default-shell Ar path
2178 Specify the default shell.
2179 This is used as the login shell for new windows when the
2181 option is set to empty, and must be the full path of the executable.
2184 tries to set a default value from the first suitable of the
2186 environment variable, the shell returned by
2190 This option should be configured when
2192 is used as a login shell.
2193 .It Ic default-terminal Ar terminal
2194 Set the default terminal for new windows created in this session - the
2195 default value of the
2197 environment variable.
2200 to work correctly, this
2204 or a derivative of it.
2205 .It Xo Ic destroy-unattached
2208 If enabled and the session is no longer attached to any clients, it is
2210 .It Xo Ic detach-on-destroy
2213 If on (the default), the client is detached when the session it is attached to
2215 If off, the client is switched to the most recently active of the remaining
2217 .It Ic display-panes-active-colour Ar colour
2218 Set the colour used by the
2220 command to show the indicator for the active pane.
2221 .It Ic display-panes-colour Ar colour
2222 Set the colour used by the
2224 command to show the indicators for inactive panes.
2225 .It Ic display-panes-time Ar time
2226 Set the time in milliseconds for which the indicators shown by the
2229 .It Ic display-time Ar time
2230 Set the amount of time for which status line messages and other on-screen
2231 indicators are displayed.
2234 .It Ic history-limit Ar lines
2235 Set the maximum number of lines held in window history.
2236 This setting applies only to new windows - existing window histories are not
2237 resized and retain the limit at the point they were created.
2238 .It Ic lock-after-time Ar number
2239 Lock the session (like the
2243 seconds of inactivity, or the entire server (all sessions) if the
2246 The default is not to lock (set to 0).
2247 .It Ic lock-command Ar shell-command
2248 Command to run when locking each client.
2249 The default is to run
2253 .It Xo Ic lock-server
2259 instead of each session locking individually as each has been
2261 .Ic lock-after-time ,
2262 the entire server will lock after
2264 sessions would have locked.
2265 This has no effect as a session option; it must be set as a global option.
2266 .It Ic message-attr Ar attributes
2267 Set status line message attributes, where
2271 or a comma-delimited list of one or more of:
2282 .It Ic message-bg Ar colour
2283 Set status line message background colour, where
2294 aixterm bright variants (if supported:
2301 from the 256-colour set,
2303 or a hexadecimal RGB string such as
2305 which chooses the closest match from the default 256-colour set.
2306 .It Ic message-command-attr Ar attributes
2307 Set status line message attributes when in command mode.
2308 .It Ic message-command-bg Ar colour
2309 Set status line message background colour when in command mode.
2310 .It Ic message-command-fg Ar colour
2311 Set status line message foreground colour when in command mode.
2312 .It Ic message-fg Ar colour
2313 Set status line message foreground colour.
2314 .It Ic message-limit Ar number
2315 Set the number of error or information messages to save in the message log for
2318 .It Xo Ic mouse-resize-pane
2323 captures the mouse and allows panes to be resized by dragging on their borders.
2324 .It Xo Ic mouse-select-pane
2329 captures the mouse and when a window is split into multiple panes the mouse may
2330 be used to select the current pane.
2331 The mouse click is also passed through to the application as normal.
2332 .It Xo Ic mouse-select-window
2335 If on, clicking the mouse on a window name in the status line will select that
2337 .It Xo Ic mouse-utf8
2340 If enabled, request mouse input as UTF-8 on UTF-8 terminals.
2341 .It Ic pane-active-border-bg Ar colour
2342 .It Ic pane-active-border-fg Ar colour
2343 Set the pane border colour for the currently active pane.
2344 .It Ic pane-border-bg Ar colour
2345 .It Ic pane-border-fg Ar colour
2346 Set the pane border colour for panes aside from the active pane.
2347 .It Ic prefix Ar key
2348 Set the key accepted as a prefix key.
2349 .It Ic prefix2 Ar key
2350 Set a secondary key accepted as a prefix key.
2351 .It Xo Ic renumber-windows
2354 If on, when a window is closed in a session, automatically renumber the other
2355 windows in numerical order.
2358 option if it has been set.
2359 If off, do not renumber the windows.
2360 .It Ic repeat-time Ar time
2361 Allow multiple commands to be entered without pressing the prefix-key again
2364 milliseconds (the default is 500).
2365 Whether a key repeats may be set when it is bound using the
2369 Repeat is enabled for the default keys bound to the
2372 .It Xo Ic set-remain-on-exit
2377 window option for any windows first created in this session.
2378 When this option is true, windows in which the running program has
2379 exited do not close, instead remaining open but inactivate.
2382 command to reactivate such a window, or the
2384 command to destroy it.
2385 .It Xo Ic set-titles
2388 Attempt to set the client terminal title using the
2393 entries if they exist.
2395 automatically sets these to the \ee]2;...\e007 sequence if
2396 the terminal appears to be an xterm.
2397 This option is off by default.
2399 will only attempt to set the window title if the STY environment
2401 .It Ic set-titles-string Ar string
2402 String used to set the window title if
2405 Character sequences are replaced as for the
2411 Show or hide the status line.
2412 .It Ic status-attr Ar attributes
2413 Set status line attributes.
2414 .It Ic status-bg Ar colour
2415 Set status line background colour.
2416 .It Ic status-fg Ar colour
2417 Set status line foreground colour.
2418 .It Ic status-interval Ar interval
2419 Update the status bar every
2422 By default, updates will occur every 15 seconds.
2423 A setting of zero disables redrawing at interval.
2424 .It Xo Ic status-justify
2425 .Op Ic left | centre | right
2427 Set the position of the window list component of the status line: left, centre
2429 .It Xo Ic status-keys
2432 Use vi or emacs-style
2433 key bindings in the status line, for example at the command prompt.
2434 The default is emacs, unless the
2438 environment variables are set and contain the string
2440 .It Ic status-left Ar string
2443 (by default the session name) to the left of the status bar.
2445 will be passed through
2450 It may also contain any of the following special character sequences:
2451 .Bl -column "Character pair" "Replaced with" -offset indent
2452 .It Sy "Character pair" Ta Sy "Replaced with"
2453 .It Li "#(shell-command)" Ta "First line of the command's output"
2454 .It Li "#[attributes]" Ta "Colour or attribute change"
2455 .It Li "##" Ta "A literal" Ql #
2458 The #(shell-command) form executes
2460 and inserts the first line of its output.
2461 Note that shell commands are only executed once at the interval specified by
2464 option: if the status line is redrawn in the meantime, the previous result is
2466 Shell commands are executed with the
2468 global environment set (see the
2472 For details on how the names and titles can be set see the
2473 .Sx "NAMES AND TITLES"
2476 #[attributes] allows a comma-separated list of attributes to be specified,
2479 to set the foreground colour,
2481 to set the background colour, the name of one of the attributes (listed under
2484 option) to turn an attribute on, or an attribute prefixed with
2486 to turn one off, for example
2489 .Bd -literal -offset indent
2490 #(sysctl vm.loadavg)
2491 #[fg=yellow,bold]#(apm -l)%%#[default] [#S]
2494 Where appropriate, special character sequences may be prefixed with a number to
2495 specify the maximum length, for example
2498 By default, UTF-8 in
2500 is not interpreted, to enable UTF-8, use the
2503 .It Ic status-left-attr Ar attributes
2504 Set the attribute of the left part of the status line.
2505 .It Ic status-left-bg Ar colour
2506 Set the background colour of the left part of the status line.
2507 .It Ic status-left-fg Ar colour
2508 Set the foreground colour of the left part of the status line.
2509 .It Ic status-left-length Ar length
2512 of the left component of the status bar.
2514 .It Xo Ic status-position
2517 Set the position of the status line.
2518 .It Ic status-right Ar string
2521 to the right of the status bar.
2522 By default, the current window title in double quotes, the date and the time
2529 character pairs are replaced, and UTF-8 is dependent on the
2532 .It Ic status-right-attr Ar attributes
2533 Set the attribute of the right part of the status line.
2534 .It Ic status-right-bg Ar colour
2535 Set the background colour of the right part of the status line.
2536 .It Ic status-right-fg Ar colour
2537 Set the foreground colour of the right part of the status line.
2538 .It Ic status-right-length Ar length
2541 of the right component of the status bar.
2543 .It Xo Ic status-utf8
2548 to treat top-bit-set characters in the
2552 strings as UTF-8; notably, this is important for wide characters.
2553 This option defaults to off.
2554 .It Ic terminal-overrides Ar string
2555 Contains a list of entries which override terminal descriptions read using
2558 is a comma-separated list of items each a colon-separated string made up of a
2559 terminal type pattern (matched using
2565 For example, to set the
2570 for all terminal types and the
2576 terminal type, the option could be set to the string:
2577 .Bd -literal -offset indent
2578 "*:clear=\ee[H\ee[2J,rxvt:dch1=\ee[P"
2581 The terminal entry value is passed through
2583 before interpretation.
2584 The default value forcibly corrects the
2586 entry for terminals which support 88 or 256 colours:
2587 .Bd -literal -offset indent
2588 "*88col*:colors=88,*256col*:colors=256,xterm*:XT"
2590 .It Ic update-environment Ar variables
2591 Set a space-separated string containing a list of environment variables to be
2592 copied into the session environment when a new session is created or an
2593 existing session is attached.
2594 Any variables that do not exist in the source environment are set to be
2595 removed from the session environment (as if
2601 "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID
2603 .It Xo Ic visual-activity
2606 If on, display a status line message when activity occurs in a window
2608 .Ic monitor-activity
2609 window option is enabled.
2610 .It Xo Ic visual-bell
2613 If this option is on, a message is shown on a bell instead of it being passed
2614 through to the terminal (which normally makes a sound).
2618 .It Xo Ic visual-content
2622 .Ic visual-activity ,
2623 display a message when content is present in a window
2626 window option is enabled.
2627 .It Xo Ic visual-silence
2632 is enabled, prints a message after the interval has expired on a given window.
2633 .It Ic word-separators Ar string
2634 Sets the session's conception of what characters are considered word
2635 separators, for the purposes of the next and previous word commands in
2640 .It Xo Ic set-window-option
2642 .Op Fl t Ar target-window
2645 .D1 (alias: Ic setw )
2646 Set a window option.
2654 flags work similarly to the
2658 Supported window options are:
2660 .Bl -tag -width Ds -compact
2661 .It Xo Ic aggressive-resize
2664 Aggressively resize the chosen window.
2667 will resize the window to the size of the smallest session for which it is the
2668 current window, rather than the smallest session to which it is attached.
2669 The window may resize when the current window is changed on another sessions;
2670 this option is good for full-screen programs which support
2672 and poor for interactive programs such as shells.
2674 .It Xo Ic allow-rename
2677 Allow programs to change the window name using a terminal escape
2678 sequence (\\033k...\\033\\\\).
2681 .It Xo Ic alternate-screen
2684 This option configures whether programs running inside
2686 may use the terminal alternate screen feature, which allows the
2692 The alternate screen feature preserves the contents of the window when an
2693 interactive application starts and restores it on exit, so that any output
2694 visible before the application starts reappears unchanged after it exits.
2697 .It Xo Ic automatic-rename
2700 Control automatic window renaming.
2701 When this setting is enabled,
2703 will rename the window automatically using the format specified by
2704 .Ic automatic-rename-format .
2705 This flag is automatically disabled for an individual window when a name
2706 is specified at creation with
2712 or with a terminal escape sequence.
2713 It may be switched off globally with:
2714 .Bd -literal -offset indent
2715 set-window-option -g automatic-rename off
2718 .It Ic automatic-rename-format Ar format
2722 .Ic automatic-rename
2725 .It Ic c0-change-interval Ar interval
2726 .It Ic c0-change-trigger Ar trigger
2727 These two options configure a simple form of rate limiting for a pane.
2732 C0 sequences that modify the screen (for example, carriage returns, linefeeds
2733 or backspaces) in one millisecond, it will stop updating the pane immediately and
2734 instead redraw it entirely every
2737 This helps to prevent fast output (such as
2739 overwhelming the terminal.
2740 The default is a trigger of 250 and an interval of 100.
2741 A trigger of zero disables the rate limiting.
2743 .It Ic clock-mode-colour Ar colour
2746 .It Xo Ic clock-mode-style
2749 Set clock hour format.
2751 .It Ic force-height Ar height
2752 .It Ic force-width Ar width
2755 from resizing a window to greater than
2759 A value of zero restores the default unlimited setting.
2761 .It Ic main-pane-height Ar height
2762 .It Ic main-pane-width Ar width
2763 Set the width or height of the main (left or top) pane in the
2769 .It Ic mode-attr Ar attributes
2770 Set window modes attributes.
2772 .It Ic mode-bg Ar colour
2773 Set window modes background colour.
2775 .It Ic mode-fg Ar colour
2776 Set window modes foreground colour.
2781 Use vi or emacs-style key bindings in copy and choice modes.
2784 option, the default is emacs, unless
2791 .It Xo Ic mode-mouse
2792 .Op Ic on | off | copy-mode
2794 Mouse state in modes.
2795 If on, the mouse may be used to enter copy mode and copy a selection by
2796 dragging, to enter copy mode and scroll with the mouse wheel, or to select an
2797 option in choice mode.
2800 the mouse behaves as set to on, but cannot be used to enter copy
2803 .It Xo Ic monitor-activity
2806 Monitor for activity in the window.
2807 Windows with activity are highlighted in the status line.
2809 .It Ic monitor-content Ar match-string
2810 Monitor content in the window.
2815 appears in the window, it is highlighted in the status line.
2817 .It Xo Ic monitor-silence
2820 Monitor for silence (no activity) in the window within
2823 Windows that have been silent for the interval are highlighted in the
2825 An interval of zero disables the monitoring.
2827 .It Ic other-pane-height Ar height
2828 Set the height of the other panes (not the main pane) in the
2831 If this option is set to 0 (the default), it will have no effect.
2833 .Ic main-pane-height
2835 .Ic other-pane-height
2836 options are set, the main pane will grow taller to make the other panes the
2837 specified height, but will never shrink to do so.
2839 .It Ic other-pane-width Ar width
2841 .Ic other-pane-height ,
2842 but set the width of other panes in the
2846 .It Ic pane-base-index Ar index
2849 but set the starting index for pane numbers.
2851 .It Xo Ic remain-on-exit
2854 A window with this flag set is not destroyed when the program running in it
2856 The window may be reactivated with the
2860 .It Xo Ic synchronize-panes
2863 Duplicate input to any pane to all other panes in the same window (only
2864 for panes that are not in any special mode).
2871 to expect UTF-8 sequences to appear in this window.
2873 .It Ic window-status-bell-attr Ar attributes
2874 Set status line attributes for windows which have a bell alert.
2876 .It Ic window-status-bell-bg Ar colour
2877 Set status line background colour for windows with a bell alert.
2879 .It Ic window-status-bell-fg Ar colour
2880 Set status line foreground colour for windows with a bell alert.
2882 .It Ic window-status-content-attr Ar attributes
2883 Set status line attributes for windows which have a content alert.
2885 .It Ic window-status-content-bg Ar colour
2886 Set status line background colour for windows with a content alert.
2888 .It Ic window-status-content-fg Ar colour
2889 Set status line foreground colour for windows with a content alert.
2891 .It Ic window-status-activity-attr Ar attributes
2892 Set status line attributes for windows which have an activity (or silence) alert.
2894 .It Ic window-status-activity-bg Ar colour
2895 Set status line background colour for windows with an activity alert.
2897 .It Ic window-status-activity-fg Ar colour
2898 Set status line foreground colour for windows with an activity alert.
2900 .It Ic window-status-attr Ar attributes
2901 Set status line attributes for a single window.
2903 .It Ic window-status-bg Ar colour
2904 Set status line background colour for a single window.
2906 .It Ic window-status-current-attr Ar attributes
2907 Set status line attributes for the currently active window.
2909 .It Ic window-status-current-bg Ar colour
2910 Set status line background colour for the currently active window.
2912 .It Ic window-status-current-fg Ar colour
2913 Set status line foreground colour for the currently active window.
2915 .It Ic window-status-current-format Ar string
2917 .Ar window-status-format ,
2918 but is the format used when the window is the current window.
2920 .It Ic window-status-last-attr Ar attributes
2921 Set status line attributes for the last active window.
2923 .It Ic window-status-last-bg Ar colour
2924 Set status line background colour for the last active window.
2926 .It Ic window-status-last-fg Ar colour
2927 Set status line foreground colour for the last active window.
2929 .It Ic window-status-fg Ar colour
2930 Set status line foreground colour for a single window.
2932 .It Ic window-status-format Ar string
2933 Set the format in which the window is displayed in the status line window list.
2936 option for details of special character sequences available.
2940 .It Ic window-status-separator Ar string
2941 Sets the separator drawn between windows in the status line.
2942 The default is a single space character.
2944 .It Xo Ic xterm-keys
2947 If this option is set,
2951 function key sequences; these have a number included to indicate modifiers such
2952 as Shift, Alt or Ctrl.
2955 .It Xo Ic wrap-search
2958 If this option is set, searches will wrap around the end of the pane contents.
2961 .It Xo Ic show-options
2963 .Op Fl t Ar target-session | Ar target-window
2966 .D1 (alias: Ic show )
2967 Show the window options (or a single window option if given) with
2970 .Ic show-window-options ) ,
2971 the server options with
2973 otherwise the session options for
2974 .Ar target session .
2975 Global session or window options are listed if
2979 shows only the option value, not the name.
2982 is set, no error will be returned if
2985 .It Xo Ic show-window-options
2987 .Op Fl t Ar target-window
2990 .D1 (alias: Ic showw )
2991 List the window options or a single option for
2993 or the global window options if
2997 shows only the option value, not the name.
3000 Certain commands accept the
3005 This is a string which controls the output format of the command.
3006 Replacement variables are enclosed in
3011 .Ql #{session_name} .
3012 Some variables also have an shorter alias such as
3015 is replaced by a single
3017 Conditionals are also accepted by prefixing with
3019 and separating two alternatives with a comma;
3020 if the specified variable exists and is not zero, the first alternative
3021 is chosen, otherwise the second is used.
3023 .Ql #{?session_attached,attached,not attached}
3024 will include the string
3026 if the session is attached and the string
3028 if it is unattached.
3029 A limit may be placed on the length of the resultant string by prefixing it
3032 a number and a colon, so
3033 .Ql #{=10:pane_title}
3034 will include at most the first 10 characters of the pane title.
3036 The following variables are available, where appropriate:
3037 .Bl -column "XXXXXXXXXXXXXXXXXXX" "XXXXX"
3038 .It Sy "Variable name" Ta Sy "Alias" Ta Sy "Replaced with"
3039 .It Li "alternate_on" Ta "" Ta "If pane is in alternate screen"
3040 .It Li "alternate_saved_x" Ta "" Ta "Saved cursor X in alternate screen"
3041 .It Li "alternate_saved_y" Ta "" Ta "Saved cursor Y in alternate screen"
3042 .It Li "buffer_sample" Ta "" Ta "First 50 characters from buffer"
3043 .It Li "buffer_size" Ta "" Ta "Size of the specified buffer in bytes"
3044 .It Li "client_activity" Ta "" Ta "Integer time client last had activity"
3045 .It Li "client_activity_string" Ta "" Ta "String time client last had activity"
3046 .It Li "client_created" Ta "" Ta "Integer time client created"
3047 .It Li "client_created_string" Ta "" Ta "String time client created"
3048 .It Li "client_height" Ta "" Ta "Height of client"
3049 .It Li "client_last_session" Ta "" Ta "Name of the client's last session"
3050 .It Li "client_prefix" Ta "" Ta "1 if prefix key has been pressed"
3051 .It Li "client_readonly" Ta "" Ta "1 if client is readonly"
3052 .It Li "client_session" Ta "" Ta "Name of the client's session"
3053 .It Li "client_termname" Ta "" Ta "Terminal name of client"
3054 .It Li "client_tty" Ta "" Ta "Pseudo terminal of client"
3055 .It Li "client_utf8" Ta "" Ta "1 if client supports utf8"
3056 .It Li "client_width" Ta "" Ta "Width of client"
3057 .It Li "cursor_flag" Ta "" Ta "Pane cursor flag"
3058 .It Li "cursor_x" Ta "" Ta "Cursor X position in pane"
3059 .It Li "cursor_y" Ta "" Ta "Cursor Y position in pane"
3060 .It Li "history_bytes" Ta "" Ta "Number of bytes in window history"
3061 .It Li "history_limit" Ta "" Ta "Maximum window history lines"
3062 .It Li "history_size" Ta "" Ta "Size of history in bytes"
3063 .It Li "host" Ta "#H" Ta "Hostname of local host"
3064 .It Li "host_short" Ta "#h" Ta "Hostname of local host (no domain name)"
3065 .It Li "insert_flag" Ta "" Ta "Pane insert flag"
3066 .It Li "keypad_cursor_flag" Ta "" Ta "Pane keypad cursor flag"
3067 .It Li "keypad_flag" Ta "" Ta "Pane keypad flag"
3068 .It Li "line" Ta "" Ta "Line number in the list"
3069 .It Li "mouse_any_flag" Ta "" Ta "Pane mouse any flag"
3070 .It Li "mouse_button_flag" Ta "" Ta "Pane mouse button flag"
3071 .It Li "mouse_standard_flag" Ta "" Ta "Pane mouse standard flag"
3072 .It Li "mouse_utf8_flag" Ta "" Ta "Pane mouse UTF-8 flag"
3073 .It Li "pane_active" Ta "" Ta "1 if active pane"
3074 .It Li "pane_current_command" Ta "" Ta "Current command if available"
3075 .It Li "pane_dead" Ta "" Ta "1 if pane is dead"
3076 .It Li "pane_height" Ta "" Ta "Height of pane"
3077 .It Li "pane_id" Ta "#D" Ta "Unique pane ID"
3078 .It Li "pane_in_mode" Ta "" Ta "If pane is in a mode"
3079 .It Li "pane_synchronized" Ta "" Ta "If pane is synchronized"
3080 .It Li "pane_index" Ta "#P" Ta "Index of pane"
3081 .It Li "pane_pid" Ta "" Ta "PID of first process in pane"
3082 .It Li "pane_start_command" Ta "" Ta "Command pane started with"
3083 .It Li "pane_start_path" Ta "" Ta "Path pane started with"
3084 .It Li "pane_tabs" Ta "" Ta "Pane tab positions"
3085 .It Li "pane_title" Ta "#T" Ta "Title of pane"
3086 .It Li "pane_tty" Ta "" Ta "Pseudo terminal of pane"
3087 .It Li "pane_width" Ta "" Ta "Width of pane"
3088 .It Li "saved_cursor_x" Ta "" Ta "Saved cursor X in pane"
3089 .It Li "saved_cursor_y" Ta "" Ta "Saved cursor Y in pane"
3090 .It Li "scroll_region_lower" Ta "" Ta "Bottom of scroll region in pane"
3091 .It Li "scroll_region_upper" Ta "" Ta "Top of scroll region in pane"
3092 .It Li "session_attached" Ta "" Ta "1 if session attached"
3093 .It Li "session_created" Ta "" Ta "Integer time session created"
3094 .It Li "session_created_string" Ta "" Ta "String time session created"
3095 .It Li "session_group" Ta "" Ta "Number of session group"
3096 .It Li "session_grouped" Ta "" Ta "1 if session in a group"
3097 .It Li "session_height" Ta "" Ta "Height of session"
3098 .It Li "session_id" Ta "" Ta "Unique session ID"
3099 .It Li "session_name" Ta "#S" Ta "Name of session"
3100 .It Li "session_width" Ta "" Ta "Width of session"
3101 .It Li "session_windows" Ta "" Ta "Number of windows in session"
3102 .It Li "window_active" Ta "" Ta "1 if window active"
3103 .It Li "window_activity_flag" Ta "" Ta "1 if window has activity alert"
3104 .It Li "window_bell_flag" Ta "" Ta "1 if window has bell"
3105 .It Li "window_content_flag" Ta "" Ta "1 if window has content alert"
3106 .It Li "window_find_matches" Ta "" Ta "Matched data from the find-window"
3107 .It Li "window_flags" Ta "#F" Ta "Window flags"
3108 .It Li "window_height" Ta "" Ta "Height of window"
3109 .It Li "window_id" Ta "" Ta "Unique window ID"
3110 .It Li "window_index" Ta "#I" Ta "Index of window"
3111 .It Li "window_layout" Ta "" Ta "Window layout description"
3112 .It Li "window_name" Ta "#W" Ta "Name of window"
3113 .It Li "window_panes" Ta "" Ta "Number of panes in window"
3114 .It Li "window_silence_flag" Ta "" Ta "1 if window has silence alert"
3115 .It Li "window_width" Ta "" Ta "Width of window"
3116 .It Li "wrap_flag" Ta "" Ta "Pane wrap flag"
3118 .Sh NAMES AND TITLES
3120 distinguishes between names and titles.
3121 Windows and sessions have names, which may be used to specify them in targets
3122 and are displayed in the status line and various lists: the name is the
3124 identifier for a window or session.
3125 Only panes have titles.
3126 A pane's title is typically set by the program running inside the pane and
3129 It is the same mechanism used to set for example the
3134 Windows themselves do not have titles - a window's title is the title of its
3137 itself may set the title of the terminal in which the client is running, see
3142 A session's name is set with the
3147 A window's name is set with one of:
3150 A command argument (such as
3158 .Bd -literal -offset indent
3159 $ printf '\e033kWINDOW_NAME\e033\e\e'
3162 Automatic renaming, which sets the name to the active command in the window's
3165 .Ic automatic-rename
3169 When a pane is first created, its title is the hostname.
3170 A pane's title can be set via the OSC title setting sequence, for example:
3171 .Bd -literal -offset indent
3172 $ printf '\e033]2;My Title\e033\e\e'
3175 When the server is started,
3177 copies the environment into the
3178 .Em global environment ;
3179 in addition, each session has a
3180 .Em session environment .
3181 When a window is created, the session and global environments are merged.
3182 If a variable exists in both, the value from the session environment is used.
3183 The result is the initial environment passed to the new process.
3186 .Ic update-environment
3187 session option may be used to update the session environment from the client
3188 when a new session is created or an old reattached.
3190 also initialises the
3192 variable with some internal information to allow commands to be executed
3193 from inside, and the
3195 variable with the correct terminal setting of
3198 Commands to alter and view the environment are:
3200 .It Xo Ic set-environment
3202 .Op Fl t Ar target-session
3203 .Ar name Op Ar value
3205 .D1 (alias: Ic setenv )
3206 Set or unset an environment variable.
3209 is used, the change is made in the global environment; otherwise, it is applied
3210 to the session environment for
3211 .Ar target-session .
3214 flag unsets a variable.
3216 indicates the variable is to be removed from the environment before starting a
3218 .It Xo Ic show-environment
3220 .Op Fl t Ar target-session
3223 .D1 (alias: Ic showenv )
3224 Display the environment for
3226 or the global environment with
3230 is omitted, all variables are shown.
3231 Variables removed from the environment are prefixed with
3236 includes an optional status line which is displayed in the bottom line of each
3238 By default, the status line is enabled (it may be disabled with the
3240 session option) and contains, from left-to-right: the name of the current
3241 session in square brackets; the window list; the title of the active pane
3242 in double quotes; and the time and date.
3244 The status line is made of three parts: configurable left and right sections
3245 (which may contain dynamic content such as the time or output from a shell
3248 .Ic status-left-length ,
3251 .Ic status-right-length
3252 options below), and a central window list.
3253 By default, the window list shows the index, name and (if any) flag of the
3254 windows present in the current session in ascending numerical order.
3255 It may be customised with the
3256 .Ar window-status-format
3258 .Ar window-status-current-format
3260 The flag is one of the following symbols appended to the window name:
3261 .Bl -column "Symbol" "Meaning" -offset indent
3262 .It Sy "Symbol" Ta Sy "Meaning"
3263 .It Li "*" Ta "Denotes the current window."
3264 .It Li "-" Ta "Marks the last window (previously selected)."
3265 .It Li "#" Ta "Window is monitored and activity has been detected."
3266 .It Li "!" Ta "A bell has occurred in the window."
3267 .It Li "+" Ta "Window is monitored for content and it has appeared."
3268 .It Li "~" Ta "The window has been silent for the monitor-silence interval."
3269 .It Li "Z" Ta "The window's active pane is zoomed."
3272 The # symbol relates to the
3273 .Ic monitor-activity
3277 The window name is printed in inverted colours if an alert (bell, activity or
3278 content) is present.
3280 The colour and attributes of the status line may be configured, the entire
3281 status line using the
3286 session options and individual windows using the
3287 .Ic window-status-attr ,
3288 .Ic window-status-fg
3290 .Ic window-status-bg
3293 The status line is automatically refreshed at interval if it has changed, the
3294 interval may be controlled with the
3298 Commands related to the status line are as follows:
3300 .It Xo Ic command-prompt
3303 .Op Fl t Ar target-client
3306 Open the command prompt in a client.
3307 This may be used from inside
3309 to execute commands interactively.
3313 is specified, it is used as the command.
3316 is a comma-separated list of the initial text for each prompt.
3321 is a comma-separated list of prompts which are displayed in order; otherwise
3322 a single prompt is displayed, constructed from
3324 if it is present, or
3332 may contain the special character sequences supported by the
3336 Before the command is executed, the first occurrence of the string
3338 and all occurrences of
3340 are replaced by the response to the first prompt, the second
3344 are replaced with the response to the second prompt, and so on for further
3346 Up to nine prompt responses may be replaced
3352 .It Xo Ic confirm-before
3354 .Op Fl t Ar target-client
3357 .D1 (alias: Ic confirm )
3358 Ask for confirmation before executing
3364 is the prompt to display; otherwise a prompt is constructed from
3366 It may contain the special character sequences supported by the
3370 This command works only from inside
3372 .It Xo Ic display-message
3374 .Op Fl c Ar target-client
3375 .Op Fl t Ar target-pane
3378 .D1 (alias: Ic display )
3382 is given, the output is printed to stdout, otherwise it is displayed in the
3389 section; information is taken from
3393 is given, otherwise the active pane for the session attached to
3398 maintains a stack of
3400 Up to the value of the
3402 option are kept; when a new buffer is added, the buffer at the bottom of the
3404 Buffers may be added using
3408 command, and pasted into a window using the
3412 A configurable history buffer is also maintained for each window.
3413 By default, up to 2000 lines are kept; this can be altered with the
3419 The buffer commands are as follows:
3424 .Op Fl t Ar target-window
3427 Put a window into buffer choice mode, where a buffer may be chosen
3428 interactively from a list.
3429 After a buffer is selected,
3431 is replaced by the buffer index in
3433 and the result executed as a command.
3436 is not given, "paste-buffer -b '%%'" is used.
3437 For the meaning of the
3442 This command works only if at least one client is attached.
3443 .It Ic clear-history Op Fl t Ar target-pane
3444 .D1 (alias: Ic clearhist )
3445 Remove and free the history for the specified pane.
3446 .It Ic delete-buffer Op Fl b Ar buffer-index
3447 .D1 (alias: Ic deleteb )
3448 Delete the buffer at
3450 or the top buffer if not specified.
3451 .It Xo Ic list-buffers
3454 .D1 (alias: Ic lsb )
3455 List the global buffers.
3456 For the meaning of the
3461 .It Xo Ic load-buffer
3462 .Op Fl b Ar buffer-index
3465 .D1 (alias: Ic loadb )
3466 Load the contents of the specified paste buffer from
3468 .It Xo Ic paste-buffer
3470 .Op Fl b Ar buffer-index
3471 .Op Fl s Ar separator
3472 .Op Fl t Ar target-pane
3474 .D1 (alias: Ic pasteb )
3475 Insert the contents of a paste buffer into the specified pane.
3476 If not specified, paste into the current one.
3479 also delete the paste buffer from the stack.
3480 When output, any linefeed (LF) characters in the paste buffer are replaced with
3481 a separator, by default carriage return (CR).
3482 A custom separator may be specified using the
3487 flag means to do no replacement (equivalent to a separator of LF).
3490 is specified, paste bracket control codes are inserted around the
3491 buffer if the application has requested bracketed paste mode.
3492 .It Xo Ic save-buffer
3494 .Op Fl b Ar buffer-index
3497 .D1 (alias: Ic saveb )
3498 Save the contents of the specified paste buffer to
3502 option appends to rather than overwriting the file.
3503 .It Xo Ic set-buffer
3504 .Op Fl b Ar buffer-index
3507 .D1 (alias: Ic setb )
3508 Set the contents of the specified buffer to
3510 .It Xo Ic show-buffer
3511 .Op Fl b Ar buffer-index
3513 .D1 (alias: Ic showb )
3514 Display the contents of the specified buffer.
3517 Miscellaneous commands are as follows:
3519 .It Ic clock-mode Op Fl t Ar target-pane
3520 Display a large clock.
3523 .Op Fl t Ar target-pane
3524 .Ar shell-command command
3532 returns success or the second
3535 Before being executed, shell-command is expanded using the rules specified in the
3537 section, including those relevant to
3542 is run in the background.
3544 .D1 (alias: Ic lock )
3545 Lock each client individually by running the command specified by the
3550 .Op Fl t Ar target-pane
3553 .D1 (alias: Ic run )
3556 in the background without creating a window.
3557 Before being executed, shell-command is expanded using the rules specified in
3563 the command is run in the background.
3564 After it finishes, any output to stdout is displayed in copy mode (in the pane
3567 or the current pane if omitted).
3568 If the command doesn't return success, the exit status is also displayed.
3570 .D1 (alias: Ic info )
3571 Show server information and terminal details.
3576 .D1 (alias: Ic wait )
3577 When used without options, prevents the client from exiting until woken using
3580 with the same channel.
3583 is used, the channel is locked and any clients that try to lock the same
3584 channel are made to wait until the channel is unlocked with
3587 This command only works from outside
3590 .Sh TERMINFO EXTENSIONS
3592 understands some extensions to
3596 Set the cursor colour.
3597 The first takes a single string argument and is used to set the colour;
3598 the second takes no arguments and restores the default cursor colour.
3599 If set, a sequence such as this may be used
3600 to change the cursor colour from inside
3602 .Bd -literal -offset indent
3603 $ printf '\e033]12;red\e033\e\e'
3606 Change the cursor style.
3607 If set, a sequence such as this may be used
3608 to change the cursor to an underline:
3609 .Bd -literal -offset indent
3610 $ printf '\e033[4 q'
3615 is set, it will be used to reset the cursor style instead
3619 This sequence can be used by
3621 to store the current buffer in the host terminal's selection (clipboard).
3624 option above and the
3630 offers a textual interface called
3632 This allows applications to communicate with
3634 using a simple text-only protocol.
3636 In control mode, a client sends
3638 commands or command sequences terminated by newlines on standard input.
3639 Each command will produce one block of output on standard output.
3640 An output block consists of a
3642 line followed by the output (which may be empty).
3643 The output block ends with a
3652 have two arguments: an integer time (as seconds from epoch) and command number.
3654 .Bd -literal -offset indent
3656 0: ksh* (1 panes) [80x24] [layout b25f,80x24,0,0,2] @2 (active)
3662 outputs notifications.
3663 A notification will never occur inside an output block.
3665 The following notifications are defined:
3667 .It Ic %exit Op Ar reason
3670 client is exiting immediately, either because it is not attached to any session
3671 or an error occurred.
3674 describes why the client exited.
3675 .It Ic %layout-change Ar window-id Ar window-layout
3676 The layout of a window with ID
3681 .It Ic %output Ar pane-id Ar value
3682 A window pane produced output.
3684 escapes non-printable characters and backslash as octal \\xxx.
3685 .It Ic %session-changed Ar session-id Ar name
3686 The client is now attached to the session with ID
3690 .It Ic %session-renamed Ar name
3691 The current session was renamed to
3693 .It Ic %sessions-changed
3694 A session was created or destroyed.
3695 .It Ic %unlinked-window-add Ar window-id
3698 was created but is not linked to the current session.
3699 .It Ic %window-add Ar window-id
3702 was linked to the current session.
3703 .It Ic %window-close Ar window-id
3707 .It Ic %window-renamed Ar window-id Ar name
3714 .Bl -tag -width "/etc/tmux.confXXX" -compact
3719 .It Pa /etc/tmux.conf
3720 System-wide configuration file.
3728 .Dl $ tmux new-session vi
3730 Most commands have a shorter form, known as an alias.
3731 For new-session, this is
3736 Alternatively, the shortest unambiguous form of a command is accepted.
3737 If there are several options, they are listed:
3738 .Bd -literal -offset indent
3740 ambiguous command: n, could be: new-session, new-window, next-window
3743 Within an active session, a new window may be created by typing
3753 Windows may be navigated with:
3755 (to select window 0),
3757 (to select window 1), and so on;
3759 to select the next window; and
3761 to select the previous window.
3763 A session may be detached using
3765 (or by an external event such as
3767 disconnection) and reattached with:
3769 .Dl $ tmux attach-session
3773 lists the current key bindings in the current window; up and down may be used
3774 to navigate the list or
3778 Commands to be run when the
3780 server is started may be placed in the
3783 Common examples include:
3785 Changing the default prefix key:
3786 .Bd -literal -offset indent
3787 set-option -g prefix C-a
3789 bind-key C-a send-prefix
3792 Turning the status line off, or changing its colour:
3793 .Bd -literal -offset indent
3794 set-option -g status off
3795 set-option -g status-bg blue
3798 Setting other options, such as the default command,
3799 or locking after 30 minutes of inactivity:
3800 .Bd -literal -offset indent
3801 set-option -g default-command "exec /bin/ksh"
3802 set-option -g lock-after-time 1800
3805 Creating new key bindings:
3806 .Bd -literal -offset indent
3807 bind-key b set-option status
3808 bind-key / command-prompt "split-window 'exec man %%'"
3809 bind-key S command-prompt "new-window -n %1 'ssh %1'"
3814 .An Nicholas Marriott Aq Mt nicm@users.sourceforge.net