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.
106 .It Fl c Ar shell-command
109 using the default shell.
112 server will be started to retrieve the
115 This option is for compatibility with
119 is used as a login shell.
121 Specify an alternative configuration file.
124 loads the system configuration file from
126 if present, then looks for a user configuration file at
129 The configuration file is a set of
131 commands which are executed in sequence when the server is first started.
133 loads configuration files once when the server process has started.
136 command may be used to load a file later.
139 shows any error messages from commands in configuration files in the first
140 session created, and continues to process the rest of the configuration file.
141 .It Fl L Ar socket-name
143 stores the server socket in a directory under
149 The default socket is named
151 This option allows a different socket name to be specified, allowing several
157 a full path is not necessary: the sockets are all created in the same
160 If the socket is accidentally removed, the
162 signal may be sent to the
164 server process to recreate it.
166 Behave as a login shell.
167 This flag currently has no effect and is for compatibility with other shells
168 when using tmux as a login shell.
172 server option to prevent the server sending various informational messages.
173 .It Fl S Ar socket-path
174 Specify a full alternative path to the server socket.
177 is specified, the default socket directory is not used and any
182 attempts to guess if the terminal is likely to support UTF-8 by checking the
188 environment variables to be set for the string "UTF-8".
189 This is not always correct: the
191 flag explicitly informs
193 that UTF-8 is supported.
195 If the server is started from a client passed
197 or where UTF-8 is detected, the
201 options are enabled in the global window and session options respectively.
203 Request verbose logging.
204 This option may be specified multiple times for increasing verbosity.
205 Log messages will be saved into
206 .Pa tmux-client-PID.log
208 .Pa tmux-server-PID.log
209 files in the current directory, where
211 is the PID of the server or client process.
212 .It Ar command Op Ar flags
213 This specifies one of a set of commands used to control
215 as described in the following sections.
216 If no commands are specified, the
222 may be controlled from an attached client by using a key combination of a
225 (Ctrl-b) by default, followed by a command key.
227 The default command key bindings are:
229 .Bl -tag -width "XXXXXXXXXX" -offset indent -compact
231 Send the prefix key (C-b) through to the application.
233 Rotate the panes in the current window forwards.
239 Break the current pane out of the window.
241 Split the current pane into two, top and bottom.
243 List all paste buffers.
245 Rename the current session.
247 Split the current pane into two, left and right.
249 Kill the current window.
251 Prompt for a window index to select.
253 Rename the current window.
255 Delete the most recently copied buffer of text.
257 Prompt for an index to move the current window.
259 Select windows 0 to 9.
265 Move to the previously active pane.
267 Choose which buffer to paste interactively from a list.
269 List all key bindings.
271 Choose a client to detach.
273 Enter copy mode to copy text or view the history.
275 Paste the most recently copied buffer of text.
279 Detach the current client.
281 Prompt to search for text in open windows.
283 Display some information about the current window.
285 Move to the previously selected window.
287 Change to the next window.
289 Select the next pane in the current window.
291 Change to the previous window.
293 Briefly display pane indexes.
295 Force redraw of the attached client.
297 Select a new session for the attached client interactively.
299 Switch the attached client back to the last session.
303 Choose the current window interactively.
305 Kill the current pane.
307 Swap the current pane with the previous pane.
309 Swap the current pane with the next pane.
311 Show previous messages from
315 Enter copy mode and scroll one page up.
318 Change to the pane above, below, to the left, or to the right of the current
321 Arrange panes in one of the five preset layouts: even-horizontal,
322 even-vertical, main-horizontal, main-vertical, or tiled.
324 Move to the next window with a bell or activity marker.
326 Rotate the panes in the current window backwards.
328 Move to the previous window with a bell or activity marker.
331 Resize the current pane in steps of one cell.
334 Resize the current pane in steps of five cells.
337 Key bindings may be changed with the
343 This section contains a list of the commands supported by
345 Most commands accept the optional
353 These specify the client, session, window or pane which a command should affect.
357 file to which the client is connected, for example either of
361 for the client attached to
363 If no client is specified, the current client is chosen, if possible, or an
365 Clients may be listed with the
370 is the session id prefixed with a $, the name of a session (as listed by the
372 command), or the name of a client with the same syntax as
374 in which case the session attached to the client is used.
375 When looking for the session name,
377 initially searches for an exact match; if none is found, the session names
378 are checked for any for which
380 is a prefix or for which it matches as an
383 If a single match is found, it is used as the target session; multiple matches
385 If a session is omitted, the current session is used if available; if no
386 current session is available, the most recently used is chosen.
389 specifies a window in the form
390 .Em session Ns \&: Ns Em window .
392 follows the same rules as for
396 is looked for in order: as a window index, for example mysession:1;
397 as a window ID, such as @1;
398 as an exact window name, such as mysession:mywindow; then as an
400 pattern or the start of a window name, such as mysession:mywin* or
402 An empty window name specifies the next unused index if appropriate (for
408 otherwise the current window in
411 The special character
413 uses the last (previously current) window,
415 selects the highest numbered window,
417 selects the lowest numbered window, and
421 select the next window or the previous window by number.
422 When the argument does not contain a colon,
424 first attempts to parse it as window; if that fails, an attempt is made to
428 takes a similar form to
430 but with the optional addition of a period followed by a pane index, for
431 example: mysession:mywindow.1.
432 If the pane index is omitted, the currently active pane in the specified
434 If neither a colon nor period appears,
436 first attempts to use the argument as a pane index; if that fails, it is looked
443 indicate the next or previous pane index, respectively.
454 may be used instead of a pane index.
456 The special characters
460 may be followed by an offset, for example:
461 .Bd -literal -offset indent
465 When dealing with a session that doesn't contain sequential window indexes,
466 they will be correctly skipped.
469 also gives each pane created in a server an identifier consisting of a
471 and a number, starting from zero.
472 A pane's identifier is unique for the life of the
474 server and is passed to the child process of the pane in the
476 environment variable.
477 It may be used alone to target a pane or the window containing it.
483 These must be passed as a single item, which typically means quoting them, for
485 .Bd -literal -offset indent
486 new-window 'vi /etc/passwd'
493 command, passed with the command and arguments separately, for example:
494 .Bd -literal -offset indent
495 bind-key F1 set-window-option force-width 81
500 .Bd -literal -offset indent
501 $ tmux bind-key F1 set-window-option force-width 81
504 Multiple commands may be specified together as part of a
505 .Em command sequence .
506 Each command should be separated by spaces and a semicolon;
507 commands are executed sequentially from left to right and
508 lines ending with a backslash continue on to the next line,
509 except when escaped by another backslash.
510 A literal semicolon may be included by escaping it with a backslash (for
511 example, when specifying a command sequence to
517 .Bd -literal -offset indent
518 refresh-client -t/dev/ttyp2
520 rename-session -tfirst newname
522 set-window-option -t:0 monitor-activity on
524 new-window ; split-window -d
526 bind-key R source-file ~/.tmux.conf \e; \e
527 display-message "source-file done"
532 .Bd -literal -offset indent
533 $ tmux kill-window -t :1
535 $ tmux new-window \e; split-window -d
537 $ tmux new-session -d 'vi /etc/passwd' \e; split-window -d \e; attach
539 .Sh CLIENTS AND SESSIONS
542 server manages clients, sessions, windows and panes.
543 Clients are attached to sessions to interact with them, either
544 when they are created with the
546 command, or later with the
549 Each session has one or more windows
552 Windows may be linked to multiple sessions and are made up of one or
554 each of which contains a pseudo terminal.
555 Commands for creating, linking and otherwise manipulating windows
558 .Sx WINDOWS AND PANES
561 The following commands are available to manage clients and sessions:
563 .It Xo Ic attach-session
565 .Op Fl t Ar target-session
567 .D1 (alias: Ic attach )
570 create a new client in the current terminal and attach it to
572 If used from inside, switch the current client.
575 is specified, any other clients attached to the session are detached.
577 signifies the client is read-only (only keys bound to the
581 commands have any effect)
583 If no server is started,
585 will attempt to start it; this will fail unless sessions are created in the
592 are slightly adjusted: if
594 needs to select the most recently used session, it will prefer the most
598 .It Xo Ic detach-client
601 .Op Fl s Ar target-session
602 .Op Fl t Ar target-client
604 .D1 (alias: Ic detach )
605 Detach the current client if bound to a key, the client specified with
607 or all clients currently attached to the session specified by
611 option kills all but the client given with
615 is given, send SIGHUP to the parent process of the client, typically causing it
617 .It Ic has-session Op Fl t Ar target-session
619 Report an error and exit with 1 if the specified session does not exist.
620 If it does exist, exit with 0.
624 server and clients and destroy all sessions.
627 .Op Fl t Ar target-session
628 Destroy the given session, closing any windows linked to it and no other
629 sessions, and detaching all clients attached to it.
632 is given, all sessions but the specified one is killed.
633 .It Xo Ic list-clients
635 .Op Fl t Ar target-session
638 List all clients attached to the server.
639 For the meaning of the
646 is specified, list only clients connected to that session.
648 .D1 (alias: Ic lscm )
649 List the syntax of all commands supported by
651 .It Ic list-sessions Op Fl F Ar format
653 List all sessions managed by the server.
654 For the meaning of the
659 .It Ic lock-client Op Fl t Ar target-client
660 .D1 (alias: Ic lockc )
666 .It Ic lock-session Op Fl t Ar target-session
667 .D1 (alias: Ic locks )
668 Lock all clients attached to
670 .It Xo Ic new-session
673 .Op Fl n Ar window-name
674 .Op Fl s Ar session-name
675 .Op Fl t Ar target-session
681 Create a new session with name
684 The new session is attached to the current terminal unless
690 are the name of and shell command to execute in the initial window.
697 specify the size of the initial window (80 by 24 if not given).
699 If run from a terminal, any
701 special characters are saved and used for new windows in the new session.
711 already exists; in the case,
720 is given, the new session is
724 This means they share the same set of windows - all windows from
726 are linked to the new session and any subsequent new windows or windows being
727 closed are applied to both sessions.
728 The current and previous window and any session options remain independent and
729 either session may be killed without affecting the other.
740 option prints information about the new session after it has been created.
741 By default, it uses the format
743 but a different format may be specified with
745 .It Xo Ic refresh-client
747 .Op Fl t Ar target-client
749 .D1 (alias: Ic refresh )
750 Refresh the current client if bound to a key, or a single client if one is given
755 is specified, only update the client's status bar.
756 .It Xo Ic rename-session
757 .Op Fl t Ar target-session
760 .D1 (alias: Ic rename )
761 Rename the session to
763 .It Xo Ic show-messages
764 .Op Fl t Ar target-client
766 .D1 (alias: Ic showmsgs )
767 Any messages displayed on the status line are saved in a per-client message
768 log, up to a maximum of the limit set by the
770 session option for the session attached to that client.
771 This command displays the log for
773 .It Ic source-file Ar path
774 .D1 (alias: Ic source )
775 Execute commands from
778 .D1 (alias: Ic start )
781 server, if not already running, without creating any sessions.
782 .It Xo Ic suspend-client
783 .Op Fl t Ar target-client
785 .D1 (alias: Ic suspendc )
786 Suspend a client by sending
789 .It Xo Ic switch-client
791 .Op Fl c Ar target-client
792 .Op Fl t Ar target-session
794 .D1 (alias: Ic switchc )
795 Switch the current session for client
804 is used, the client is moved to the last, next or previous session
807 toggles whether a client is read-only (see the
811 .Sh WINDOWS AND PANES
814 window may be in one of several modes.
815 The default permits direct access to the terminal attached to the window.
816 The other is copy mode, which permits a section of a window or its
817 history to be copied to a
819 for later insertion into another window.
820 This mode is entered with the
825 It is also entered when a command that produces output, such as
827 is executed from a key binding.
829 The keys available depend on whether emacs or vi mode is selected
833 The following keys are supported as appropriate for the mode:
834 .Bl -column "FunctionXXXXXXXXXXXXXXXXX" "viXXXXXXXXXX" "emacs" -offset indent
835 .It Sy "Function" Ta Sy "vi" Ta Sy "emacs"
836 .It Li "Back to indentation" Ta "^" Ta "M-m"
837 .It Li "Bottom of history" Ta "G" Ta "M-<"
838 .It Li "Clear selection" Ta "Escape" Ta "C-g"
839 .It Li "Copy selection" Ta "Enter" Ta "M-w"
840 .It Li "Cursor down" Ta "j" Ta "Down"
841 .It Li "Cursor left" Ta "h" Ta "Left"
842 .It Li "Cursor right" Ta "l" Ta "Right"
843 .It Li "Cursor to bottom line" Ta "L" Ta ""
844 .It Li "Cursor to middle line" Ta "M" Ta "M-r"
845 .It Li "Cursor to top line" Ta "H" Ta "M-R"
846 .It Li "Cursor up" Ta "k" Ta "Up"
847 .It Li "Delete entire line" Ta "d" Ta "C-u"
848 .It Li "Delete/Copy to end of line" Ta "D" Ta "C-k"
849 .It Li "End of line" Ta "$" Ta "C-e"
850 .It Li "Go to line" Ta ":" Ta "g"
851 .It Li "Half page down" Ta "C-d" Ta "M-Down"
852 .It Li "Half page up" Ta "C-u" Ta "M-Up"
853 .It Li "Jump forward" Ta "f" Ta "f"
854 .It Li "Jump to forward" Ta "t" Ta ""
855 .It Li "Jump backward" Ta "F" Ta "F"
856 .It Li "Jump to backward" Ta "T" Ta ""
857 .It Li "Jump again" Ta ";" Ta ";"
858 .It Li "Jump again in reverse" Ta "," Ta ","
859 .It Li "Next page" Ta "C-f" Ta "Page down"
860 .It Li "Next space" Ta "W" Ta ""
861 .It Li "Next space, end of word" Ta "E" Ta ""
862 .It Li "Next word" Ta "w" Ta ""
863 .It Li "Next word end" Ta "e" Ta "M-f"
864 .It Li "Paste buffer" Ta "p" Ta "C-y"
865 .It Li "Previous page" Ta "C-b" Ta "Page up"
866 .It Li "Previous word" Ta "b" Ta "M-b"
867 .It Li "Previous space" Ta "B" Ta ""
868 .It Li "Quit mode" Ta "q" Ta "Escape"
869 .It Li "Rectangle toggle" Ta "v" Ta "R"
870 .It Li "Scroll down" Ta "C-Down or C-e" Ta "C-Down"
871 .It Li "Scroll up" Ta "C-Up or C-y" Ta "C-Up"
872 .It Li "Search again" Ta "n" Ta "n"
873 .It Li "Search again in reverse" Ta "N" Ta "N"
874 .It Li "Search backward" Ta "?" Ta "C-r"
875 .It Li "Search forward" Ta "/" Ta "C-s"
876 .It Li "Start of line" Ta "0" Ta "C-a"
877 .It Li "Start selection" Ta "Space" Ta "C-Space"
878 .It Li "Top of history" Ta "g" Ta "M->"
879 .It Li "Transpose characters" Ta "" Ta "C-t"
882 The next and previous word keys use space and the
887 characters as word delimiters by default, but this can be adjusted by
891 Next word moves to the start of the next word, next word end to the end of the
892 next word and previous word to the start of the previous word.
893 The three next and previous space keys work similarly but use a space alone as
896 The jump commands enable quick movement within a line.
901 will move the cursor to the next
903 character on the current line.
906 will then jump to the next occurrence.
908 Commands in copy mode may be prefaced by an optional repeat count.
909 With vi key bindings, a prefix is entered using the number keys; with
910 emacs, the Alt (meta) key and a number begins prefix entry.
911 For example, to move the cursor forward by ten words, use
917 When copying the selection, the repeat count indicates the buffer index to
920 Mode key bindings are defined in a set of named tables:
924 for keys used when line editing at the command prompt;
928 for keys used when choosing from lists (such as produced by the
935 The tables may be viewed with the
937 command and keys modified or removed with
941 One command accepts an argument,
943 which copies the selection and pipes it to a command.
944 For example the following will bind
946 to copy the selection into
948 as well as the paste buffer:
949 .Bd -literal -offset indent
950 bind-key -temacs-copy C-q copy-pipe "cat >/tmp/out"
953 The paste buffer key pastes the first line from the top paste buffer on the
962 .Op Fl t Ar target-pane
967 option scrolls one page up.
970 Each window displayed by
972 may be split into one or more
974 each pane takes up a certain area of the display and is a separate terminal.
975 A window may be split into panes using the
978 Windows may be split horizontally (with the
981 Panes may be resized with the
989 by default), the current pane may be changed with the
995 commands may be used to swap panes without changing their position.
996 Panes are numbered beginning from zero in the order they are created.
1001 These may be selected with the
1003 command or cycled with
1007 by default); once a layout is chosen, panes within it may be moved and resized
1010 The following layouts are supported:
1012 .It Ic even-horizontal
1013 Panes are spread out evenly from left to right across the window.
1014 .It Ic even-vertical
1015 Panes are spread evenly from top to bottom.
1016 .It Ic main-horizontal
1017 A large (main) pane is shown at the top of the window and the remaining panes
1018 are spread from left to right in the leftover space at the bottom.
1020 .Em main-pane-height
1021 window option to specify the height of the top pane.
1022 .It Ic main-vertical
1025 but the large pane is placed on the left and the others spread from top to
1026 bottom along the right.
1031 Panes are spread out as evenly as possible over the window in both rows and
1037 may be used to apply a previously used layout - the
1039 command displays the layout of each window in a form suitable for use with
1042 .Bd -literal -offset indent
1045 layout: bb62,159x48,0,0{79x48,0,0,79x48,80,0}
1046 $ tmux select-layout bb62,159x48,0,0{79x48,0,0,79x48,80,0}
1050 automatically adjusts the size of the layout for the current window size.
1051 Note that a layout cannot be applied to a window with more panes than that
1052 from which the layout was originally defined.
1054 Commands related to windows and panes are as follows:
1056 .It Xo Ic break-pane
1059 .Op Fl t Ar target-pane
1061 .D1 (alias: Ic breakp )
1064 off from its containing window to make it the only pane in a new window.
1067 is given, the new window does not become the current window.
1070 option prints information about the new window after it has been created.
1071 By default, it uses the format
1072 .Ql #{session_name}:#{window_index}
1073 but a different format may be specified with
1075 .It Xo Ic capture-pane
1077 .Op Fl b Ar buffer-index
1078 .Op Fl E Ar end-line
1079 .Op Fl S Ar start-line
1080 .Op Fl t Ar target-pane
1082 .D1 (alias: Ic capturep )
1083 Capture the contents of a pane.
1086 is given, the output goes to stdout, otherwise to the buffer specified with
1088 or a new buffer if omitted.
1091 is given, the alternate screen is used, and the history is not accessible.
1092 If no alternate screen exists, an error will be returned unless
1097 is given, the output includes escape sequences for text and background
1100 also escapes non-printable characters as octal \exxx.
1102 joins wrapped lines and preserves trailing spaces at each line's end.
1104 captures only any output that the pane has received that is the beginning of an
1105 as-yet incomplete escape sequence.
1110 specify the starting and ending line numbers, zero is the first line of the
1111 visible pane and negative numbers are lines in the history.
1112 The default is to capture only the visible contents of the pane.
1116 .Op Fl t Ar target-window
1119 Put a window into client choice mode, allowing a client to be selected
1120 interactively from a list.
1121 After a client is chosen,
1123 is replaced by the client
1127 and the result executed as a command.
1130 is not given, "detach-client -t '%%'" is used.
1131 For the meaning of the
1136 This command works only if at least one client is attached.
1140 .Op Fl t Ar target-window
1143 Put a window into list choice mode, allowing
1147 can be a comma-separated list to display more than one item.
1148 If an item has spaces, that entry must be quoted.
1149 After an item is chosen,
1151 is replaced by the chosen item in the
1153 and the result is executed as a command.
1156 is not given, "run-shell '%%'" is used.
1158 also accepts format specifiers.
1159 For the meaning of this see the
1162 This command works only if at least one client is attached.
1166 .Op Fl t Ar target-window
1169 Put a window into session choice mode, where a session may be selected
1170 interactively from a list.
1173 is replaced by the session name in
1175 and the result executed as a command.
1178 is not given, "switch-client -t '%%'" is used.
1179 For the meaning of the
1184 This command works only if at least one client is attached.
1188 .Op Fl b Ar session-template
1189 .Op Fl c Ar window-template
1192 .Op Fl t Ar target-window
1194 Put a window into tree choice mode, where either sessions or windows may be
1195 selected interactively from a list.
1196 By default, windows belonging to a session are indented to show their
1197 relationship to a session.
1203 commands are wrappers around
1208 is given, will show sessions.
1211 is given, will show windows.
1213 By default, the tree is collapsed and sessions must be expanded to windows
1214 with the right arrow key.
1217 option will start with all sessions expanded instead.
1221 is given, will override the default session command.
1224 can be used and will be replaced with the session name.
1225 The default option if not specified is "switch-client -t '%%'".
1228 is given, will override the default window command.
1232 can be used and will be replaced with the session name and window index.
1233 When a window is chosen from the list, the session command is run before the
1238 is given will display the specified format instead of the default session
1242 is given will display the specified format instead of the default window
1244 For the meaning of the
1252 This command works only if at least one client is attached.
1256 .Op Fl t Ar target-window
1259 Put a window into window choice mode, where a window may be chosen
1260 interactively from a list.
1261 After a window is selected,
1263 is replaced by the session name and window index in
1265 and the result executed as a command.
1268 is not given, "select-window -t '%%'" is used.
1269 For the meaning of the
1274 This command works only if at least one client is attached.
1275 .It Ic display-panes Op Fl t Ar target-client
1276 .D1 (alias: Ic displayp)
1277 Display a visible indicator of each pane shown by
1280 .Ic display-panes-time ,
1281 .Ic display-panes-colour ,
1283 .Ic display-panes-active-colour
1285 While the indicator is on screen, a pane may be selected with the
1290 .It Xo Ic find-window
1293 .Op Fl t Ar target-window
1296 .D1 (alias: Ic findw )
1301 in window names, titles, and visible content (but not history).
1302 The flags control matching behavior:
1304 matches only visible window contents,
1306 matches only the window name and
1308 matches only the window title.
1311 If only one window is matched, it'll be automatically selected,
1312 otherwise a choice list is shown.
1313 For the meaning of the
1318 This command works only if at least one client is attached.
1323 .Fl p Ar percentage Oc
1324 .Op Fl s Ar src-pane
1325 .Op Fl t Ar dst-pane
1327 .D1 (alias: Ic joinp )
1330 but instead of splitting
1332 and creating a new pane, split it and move
1335 This can be used to reverse
1341 to be joined to left of or above
1345 .Op Fl t Ar target-pane
1347 .D1 (alias: Ic killp )
1348 Destroy the given pane.
1349 If no panes remain in the containing window, it is also destroyed.
1352 option kills all but the pane given with
1354 .It Xo Ic kill-window
1356 .Op Fl t Ar target-window
1358 .D1 (alias: Ic killw )
1359 Kill the current window or the window at
1361 removing it from any sessions to which it is linked.
1364 option kills all but the window given with
1366 .It Ic last-pane Op Fl t Ar target-window
1367 .D1 (alias: Ic lastp )
1368 Select the last (previously selected) pane.
1369 .It Ic last-window Op Fl t Ar target-session
1370 .D1 (alias: Ic last )
1371 Select the last (previously selected) window.
1374 is specified, select the last window of the current session.
1375 .It Xo Ic link-window
1377 .Op Fl s Ar src-window
1378 .Op Fl t Ar dst-window
1380 .D1 (alias: Ic linkw )
1387 is specified and no such window exists, the
1394 exists, it is killed, otherwise an error is generated.
1397 is given, the newly linked window is not selected.
1398 .It Xo Ic list-panes
1403 .D1 (alias: Ic lsp )
1408 is ignored and all panes on the server are listed.
1413 is a session (or the current session).
1414 If neither is given,
1416 is a window (or the current window).
1417 For the meaning of the
1422 .It Xo Ic list-windows
1425 .Op Fl t Ar target-session
1427 .D1 (alias: Ic lsw )
1430 is given, list all windows on the server.
1431 Otherwise, list windows in the current session or in
1432 .Ar target-session .
1433 For the meaning of the
1442 .Fl p Ar percentage Oc
1443 .Op Fl s Ar src-pane
1444 .Op Fl t Ar dst-pane
1446 .D1 (alias: Ic movep )
1453 may belong to the same window.
1454 .It Xo Ic move-window
1456 .Op Fl s Ar src-window
1457 .Op Fl t Ar dst-window
1459 .D1 (alias: Ic movew )
1462 except the window at
1468 all windows in the session are renumbered in sequential order, respecting
1472 .It Xo Ic new-window
1474 .Op Fl c Ar start-directory
1476 .Op Fl n Ar window-name
1477 .Op Fl t Ar target-window
1478 .Op Ar shell-command
1480 .D1 (alias: Ic neww )
1481 Create a new window.
1484 the new window is inserted at the next index up from the specified
1486 moving windows up if necessary,
1489 is the new window location.
1493 is given, the session does not make the new window the current window.
1495 represents the window to be created; if the target already exists an error is
1498 flag is used, in which case it is destroyed.
1500 is the command to execute.
1503 is not specified, the value of the
1507 specifies the working directory in which the new window is created.
1508 It may have an absolute path or one of the following values (or a subdirectory):
1509 .Bl -column "XXXXXXXXXXXX" "XXXXXXXXXXXXXXXXXXXXXXXX" -offset indent
1510 .It Li "Empty string" Ta "Current pane's directory"
1511 .It Li "~" Ta "User's home directory"
1512 .It Li "-" Ta "Where session was started"
1513 .It Li "." Ta "Where server was started"
1516 When the shell command completes, the window closes.
1519 option to change this behaviour.
1523 environment variable must be set to
1525 for all programs running
1528 New windows will automatically have
1530 added to their environment, but care must be taken not to reset this in shell
1535 option prints information about the new window after it has been created.
1536 By default, it uses the format
1537 .Ql #{session_name}:#{window_index}
1538 but a different format may be specified with
1540 .It Ic next-layout Op Fl t Ar target-window
1541 .D1 (alias: Ic nextl )
1542 Move a window to the next layout and rearrange the panes to fit.
1543 .It Xo Ic next-window
1545 .Op Fl t Ar target-session
1547 .D1 (alias: Ic next )
1548 Move to the next window in the session.
1551 is used, move to the next window with an alert.
1554 .Op Fl t Ar target-pane
1555 .Op Ar shell-command
1557 .D1 (alias: Ic pipep )
1558 Pipe any output sent by the program in
1561 A pane may only be piped to one command at a time, any existing pipe is
1567 string may contain the special character sequences supported by the
1572 is given, the current pipe (if any) is closed.
1576 option only opens a new pipe if no previous pipe exists, allowing a pipe to
1577 be toggled with a single key, for example:
1578 .Bd -literal -offset indent
1579 bind-key C-p pipe-pane -o 'cat >>~/output.#I-#P'
1581 .It Xo Ic previous-layout
1582 .Op Fl t Ar target-window
1584 .D1 (alias: Ic prevl )
1585 Move to the previous layout in the session.
1586 .It Xo Ic previous-window
1588 .Op Fl t Ar target-session
1590 .D1 (alias: Ic prev )
1591 Move to the previous window in the session.
1594 move to the previous window with an alert.
1595 .It Xo Ic rename-window
1596 .Op Fl t Ar target-window
1599 .D1 (alias: Ic renamew )
1600 Rename the current window, or the window at
1604 .It Xo Ic resize-pane
1606 .Op Fl t Ar target-pane
1611 .D1 (alias: Ic resizep )
1612 Resize a pane, up, down, left or right by
1628 is given in lines or cells (the default is 1).
1632 the active pane is toggled between zoomed (occupying the whole of the window)
1633 and unzoomed (its normal position in the layout).
1634 .It Xo Ic respawn-pane
1636 .Op Fl t Ar target-pane
1637 .Op Ar shell-command
1639 .D1 (alias: Ic respawnp )
1640 Reactivate a pane in which the command has exited (see the
1645 is not given, the command used when the pane was created is executed.
1646 The pane must be already inactive, unless
1648 is given, in which case any existing command is killed.
1649 .It Xo Ic respawn-window
1651 .Op Fl t Ar target-window
1652 .Op Ar shell-command
1654 .D1 (alias: Ic respawnw )
1655 Reactivate a window in which the command has exited (see the
1660 is not given, the command used when the window was created is executed.
1661 The window must be already inactive, unless
1663 is given, in which case any existing command is killed.
1664 .It Xo Ic rotate-window
1666 .Op Fl t Ar target-window
1668 .D1 (alias: Ic rotatew )
1669 Rotate the positions of the panes within a window, either upward (numerically
1672 or downward (numerically higher).
1673 .It Xo Ic select-layout
1675 .Op Fl t Ar target-window
1678 .D1 (alias: Ic selectl )
1679 Choose a specific layout for a window.
1682 is not given, the last preset layout used (if any) is reapplied.
1686 are equivalent to the
1691 .It Xo Ic select-pane
1693 .Op Fl t Ar target-pane
1695 .D1 (alias: Ic selectp )
1698 the active pane in window
1706 is used, respectively the pane below, to the left, to the right, or above the
1707 target pane is used.
1709 is the same as using the
1712 .It Xo Ic select-window
1714 .Op Fl t Ar target-window
1716 .D1 (alias: Ic selectw )
1717 Select the window at
1723 are equivalent to the
1731 is given and the selected window is already the current window,
1732 the command behaves like
1734 .It Xo Ic split-window
1736 .Op Fl c Ar start-directory
1739 .Fl p Ar percentage Oc
1740 .Op Fl t Ar target-pane
1741 .Op Ar shell-command
1744 .D1 (alias: Ic splitw )
1745 Create a new pane by splitting
1748 does a horizontal split and
1750 a vertical split; if neither is specified,
1757 options specify the size of the new pane in lines (for vertical split) or in
1758 cells (for horizontal split), or as a percentage, respectively.
1759 All other options have the same meaning as for the
1764 .Op Fl s Ar src-pane
1765 .Op Fl t Ar dst-pane
1767 .D1 (alias: Ic swapp )
1771 is used and no source pane is specified with
1774 is swapped with the previous pane (before it numerically);
1776 swaps with the next pane (after it numerically).
1780 not to change the active pane.
1781 .It Xo Ic swap-window
1783 .Op Fl s Ar src-window
1784 .Op Fl t Ar dst-window
1786 .D1 (alias: Ic swapw )
1789 except the source and destination windows are swapped.
1790 It is an error if no window exists at
1792 .It Xo Ic unlink-window
1794 .Op Fl t Ar target-window
1796 .D1 (alias: Ic unlinkw )
1801 is given, a window may be unlinked only if it is linked to multiple sessions -
1802 windows may not be linked to no sessions;
1805 is specified and the window is linked to only one session, it is unlinked and
1810 allows a command to be bound to most keys, with or without a prefix key.
1811 When specifying keys, most represent themselves (for example
1815 Ctrl keys may be prefixed with
1821 In addition, the following special key names are accepted:
1839 .Em NPage/PageDown/PgDn ,
1840 .Em PPage/PageUp/PgUp ,
1844 Note that to bind the
1848 keys, quotation marks are necessary, for example:
1849 .Bd -literal -offset indent
1850 bind-key '"' split-window
1851 bind-key "'" new-window
1854 Commands related to key bindings are as follows:
1858 .Op Fl t Ar key-table
1859 .Ar key Ar command Op Ar arguments
1861 .D1 (alias: Ic bind )
1868 the primary key bindings are modified (those normally activated with the prefix
1869 key); in this case, if
1871 is specified, it is not necessary to use the prefix key,
1878 flag indicates this key may repeat, see the
1888 the binding for command mode with
1890 or for normal mode without.
1891 To view the default bindings and possible commands, see the
1894 .It Ic list-keys Op Fl t Ar key-table
1895 .D1 (alias: Ic lsk )
1896 List all key bindings.
1899 the primary key bindings - those executed when preceded by the prefix key -
1906 are listed; this may be one of:
1916 .Op Fl t Ar target-pane
1919 .D1 (alias: Ic send )
1920 Send a key or keys to a window.
1923 is the name of the key (such as
1927 ) to send; if the string is not recognised as a key, it is sent as a series of
1931 flag disables key name lookup and sends the keys literally.
1932 All arguments are sent sequentially from first to last.
1935 flag causes the terminal state to be reset.
1936 .It Xo Ic send-prefix
1938 .Op Fl t Ar target-pane
1940 Send the prefix key, or with
1942 the secondary prefix key, to a window as if it was pressed.
1943 .It Xo Ic unbind-key
1945 .Op Fl t Ar key-table
1948 .D1 (alias: Ic unbind )
1949 Unbind the command bound to
1953 the primary key bindings are modified; in this case, if
1955 is specified, the command bound to
1957 without a prefix (if any) is removed.
1960 is present, all key bindings are removed.
1968 is unbound: the binding for command mode with
1970 or for normal mode without.
1973 The appearance and behaviour of
1975 may be modified by changing the value of various options.
1976 There are three types of option:
1977 .Em server options ,
1980 .Em window options .
1984 server has a set of global options which do not apply to any particular
1986 These are altered with the
1989 command, or displayed with the
1994 In addition, each individual session may have a set of session options, and
1995 there is a separate set of global session options.
1996 Sessions which do not have a particular option configured inherit the value
1997 from the global session options.
1998 Session options are set or unset with the
2000 command and may be listed with the
2003 The available server and session options are listed under the
2007 Similarly, a set of window options is attached to each window, and there is
2008 a set of global window options from which any unset options are inherited.
2009 Window options are altered with the
2010 .Ic set-window-option
2011 command and can be listed with the
2012 .Ic show-window-options
2014 All window options are documented with the
2015 .Ic set-window-option
2019 also supports user options which are prefixed with a
2021 User options may have any name, so long as they are prefixed with
2023 and be set to any string.
2025 .Bd -literal -offset indent
2026 $ tmux setw -q @foo "abc123"
2027 $ tmux showw -v @foo
2031 Commands which set options are as follows:
2033 .It Xo Ic set-option
2035 .Op Fl t Ar target-session | Ar target-window
2038 .D1 (alias: Ic set )
2039 Set a window option with
2042 .Ic set-window-option
2044 a server option with
2046 otherwise a session option.
2050 is specified, the global session or window option is set.
2053 and if the option expects a string,
2055 is appended to the existing setting.
2058 flag unsets an option, so a session inherits the option from the global
2060 It is not possible to unset a global option.
2064 flag prevents setting an option that is already set.
2068 flag suppresses the informational message (as if the
2070 server option was set).
2072 Available window options are listed under
2073 .Ic set-window-option .
2076 depends on the option and may be a number, a string, or a flag (on, off, or
2079 Available server options are:
2081 .It Ic buffer-limit Ar number
2082 Set the number of buffers; as new buffers are added to the top of the stack,
2083 old ones are removed from the bottom if necessary to maintain this maximum
2085 .It Ic escape-time Ar time
2086 Set the time in milliseconds for which
2088 waits after an escape is input to determine if it is part of a function or meta
2090 The default is 500 milliseconds.
2091 .It Xo Ic exit-unattached
2094 If enabled, the server will exit when there are no attached clients.
2095 .It Xo Ic focus-events
2098 When enabled, focus events are requested from the terminal if supported and
2099 passed through to applications running in
2101 Attached clients should be detached and attached again after changing this
2106 Enable or disable the display of various informational messages (see also the
2109 .It Xo Ic set-clipboard
2112 Attempt to set the terminal clipboard content using the
2116 This option is on by default if there is an
2120 description for the client terminal.
2121 Note that this feature needs to be enabled in
2123 by setting the resource:
2124 .Bd -literal -offset indent
2125 disallowedWindowOps: 20,21,SetXprop
2128 Or changing this property from the
2130 interactive menu when required.
2133 Available session options are:
2135 .It Ic assume-paste-time Ar milliseconds
2136 If keys are entered faster than one in
2138 they are assumed to have been pasted rather than typed and
2140 key bindings are not processed.
2141 The default is one millisecond and zero disables.
2142 .It Ic base-index Ar index
2143 Set the base index from which an unused index should be searched when a new
2145 The default is zero.
2146 .It Xo Ic bell-action
2147 .Op Ic any | none | current
2149 Set action on window bell.
2151 means a bell in any window linked to a session causes a bell in the current
2152 window of that session,
2154 means all bells are ignored and
2156 means only bells in windows other than the current window are ignored.
2157 .It Xo Ic bell-on-alert
2160 If on, ring the terminal bell when an alert
2162 .It Ic default-command Ar shell-command
2163 Set the command used for new windows (if not specified when the window is
2169 The default is an empty string, which instructs
2171 to create a login shell using the value of the
2174 .It Ic default-path Ar path
2175 Set the default working directory for new panes.
2176 If empty (the default), the working directory is determined from the process
2177 running in the active pane, from the command line environment or from the
2178 working directory where the session was created.
2179 Otherwise the same options are available as for the
2183 .It Ic default-shell Ar path
2184 Specify the default shell.
2185 This is used as the login shell for new windows when the
2187 option is set to empty, and must be the full path of the executable.
2190 tries to set a default value from the first suitable of the
2192 environment variable, the shell returned by
2196 This option should be configured when
2198 is used as a login shell.
2199 .It Ic default-terminal Ar terminal
2200 Set the default terminal for new windows created in this session - the
2201 default value of the
2203 environment variable.
2206 to work correctly, this
2210 or a derivative of it.
2211 .It Xo Ic destroy-unattached
2214 If enabled and the session is no longer attached to any clients, it is
2216 .It Xo Ic detach-on-destroy
2219 If on (the default), the client is detached when the session it is attached to
2221 If off, the client is switched to the most recently active of the remaining
2223 .It Ic display-panes-active-colour Ar colour
2224 Set the colour used by the
2226 command to show the indicator for the active pane.
2227 .It Ic display-panes-colour Ar colour
2228 Set the colour used by the
2230 command to show the indicators for inactive panes.
2231 .It Ic display-panes-time Ar time
2232 Set the time in milliseconds for which the indicators shown by the
2235 .It Ic display-time Ar time
2236 Set the amount of time for which status line messages and other on-screen
2237 indicators are displayed.
2240 .It Ic history-limit Ar lines
2241 Set the maximum number of lines held in window history.
2242 This setting applies only to new windows - existing window histories are not
2243 resized and retain the limit at the point they were created.
2244 .It Ic lock-after-time Ar number
2245 Lock the session (like the
2249 seconds of inactivity, or the entire server (all sessions) if the
2252 The default is not to lock (set to 0).
2253 .It Ic lock-command Ar shell-command
2254 Command to run when locking each client.
2255 The default is to run
2259 .It Xo Ic lock-server
2265 instead of each session locking individually as each has been
2267 .Ic lock-after-time ,
2268 the entire server will lock after
2270 sessions would have locked.
2271 This has no effect as a session option; it must be set as a global option.
2272 .It Ic message-attr Ar attributes
2273 Set status line message attributes, where
2277 or a comma-delimited list of one or more of:
2288 .It Ic message-bg Ar colour
2289 Set status line message background colour, where
2300 aixterm bright variants (if supported:
2307 from the 256-colour set,
2309 or a hexadecimal RGB string such as
2311 which chooses the closest match from the default 256-colour set.
2312 .It Ic message-command-attr Ar attributes
2313 Set status line message attributes when in command mode.
2314 .It Ic message-command-bg Ar colour
2315 Set status line message background colour when in command mode.
2316 .It Ic message-command-fg Ar colour
2317 Set status line message foreground colour when in command mode.
2318 .It Ic message-fg Ar colour
2319 Set status line message foreground colour.
2320 .It Ic message-limit Ar number
2321 Set the number of error or information messages to save in the message log for
2324 .It Xo Ic mouse-resize-pane
2329 captures the mouse and allows panes to be resized by dragging on their borders.
2330 .It Xo Ic mouse-select-pane
2335 captures the mouse and when a window is split into multiple panes the mouse may
2336 be used to select the current pane.
2337 The mouse click is also passed through to the application as normal.
2338 .It Xo Ic mouse-select-window
2341 If on, clicking the mouse on a window name in the status line will select that
2343 .It Xo Ic mouse-utf8
2346 If enabled, request mouse input as UTF-8 on UTF-8 terminals.
2347 .It Ic pane-active-border-bg Ar colour
2348 .It Ic pane-active-border-fg Ar colour
2349 Set the pane border colour for the currently active pane.
2350 .It Ic pane-border-bg Ar colour
2351 .It Ic pane-border-fg Ar colour
2352 Set the pane border colour for panes aside from the active pane.
2353 .It Ic prefix Ar key
2354 Set the key accepted as a prefix key.
2355 .It Ic prefix2 Ar key
2356 Set a secondary key accepted as a prefix key.
2357 .It Xo Ic renumber-windows
2360 If on, when a window is closed in a session, automatically renumber the other
2361 windows in numerical order.
2364 option if it has been set.
2365 If off, do not renumber the windows.
2366 .It Ic repeat-time Ar time
2367 Allow multiple commands to be entered without pressing the prefix-key again
2370 milliseconds (the default is 500).
2371 Whether a key repeats may be set when it is bound using the
2375 Repeat is enabled for the default keys bound to the
2378 .It Xo Ic set-remain-on-exit
2383 window option for any windows first created in this session.
2384 When this option is true, windows in which the running program has
2385 exited do not close, instead remaining open but inactivate.
2388 command to reactivate such a window, or the
2390 command to destroy it.
2391 .It Xo Ic set-titles
2394 Attempt to set the client terminal title using the
2399 entries if they exist.
2401 automatically sets these to the \ee]2;...\e007 sequence if
2402 the terminal appears to be an xterm.
2403 This option is off by default.
2405 will only attempt to set the window title if the STY environment
2407 .It Ic set-titles-string Ar string
2408 String used to set the window title if
2411 Character sequences are replaced as for the
2417 Show or hide the status line.
2418 .It Ic status-attr Ar attributes
2419 Set status line attributes.
2420 .It Ic status-bg Ar colour
2421 Set status line background colour.
2422 .It Ic status-fg Ar colour
2423 Set status line foreground colour.
2424 .It Ic status-interval Ar interval
2425 Update the status bar every
2428 By default, updates will occur every 15 seconds.
2429 A setting of zero disables redrawing at interval.
2430 .It Xo Ic status-justify
2431 .Op Ic left | centre | right
2433 Set the position of the window list component of the status line: left, centre
2435 .It Xo Ic status-keys
2438 Use vi or emacs-style
2439 key bindings in the status line, for example at the command prompt.
2440 The default is emacs, unless the
2444 environment variables are set and contain the string
2446 .It Ic status-left Ar string
2449 (by default the session name) to the left of the status bar.
2451 will be passed through
2456 It may also contain any of the following special character sequences:
2457 .Bl -column "Character pair" "Replaced with" -offset indent
2458 .It Sy "Character pair" Ta Sy "Replaced with"
2459 .It Li "#(shell-command)" Ta "First line of the command's output"
2460 .It Li "#[attributes]" Ta "Colour or attribute change"
2461 .It Li "##" Ta "A literal" Ql #
2464 The #(shell-command) form executes
2466 and inserts the first line of its output.
2467 Note that shell commands are only executed once at the interval specified by
2470 option: if the status line is redrawn in the meantime, the previous result is
2472 Shell commands are executed with the
2474 global environment set (see the
2478 For details on how the names and titles can be set see the
2479 .Sx "NAMES AND TITLES"
2482 #[attributes] allows a comma-separated list of attributes to be specified,
2485 to set the foreground colour,
2487 to set the background colour, the name of one of the attributes (listed under
2490 option) to turn an attribute on, or an attribute prefixed with
2492 to turn one off, for example
2495 .Bd -literal -offset indent
2496 #(sysctl vm.loadavg)
2497 #[fg=yellow,bold]#(apm -l)%%#[default] [#S]
2500 Where appropriate, special character sequences may be prefixed with a number to
2501 specify the maximum length, for example
2504 By default, UTF-8 in
2506 is not interpreted, to enable UTF-8, use the
2509 .It Ic status-left-attr Ar attributes
2510 Set the attribute of the left part of the status line.
2511 .It Ic status-left-bg Ar colour
2512 Set the background colour of the left part of the status line.
2513 .It Ic status-left-fg Ar colour
2514 Set the foreground colour of the left part of the status line.
2515 .It Ic status-left-length Ar length
2518 of the left component of the status bar.
2520 .It Xo Ic status-position
2523 Set the position of the status line.
2524 .It Ic status-right Ar string
2527 to the right of the status bar.
2528 By default, the current window title in double quotes, the date and the time
2535 character pairs are replaced, and UTF-8 is dependent on the
2538 .It Ic status-right-attr Ar attributes
2539 Set the attribute of the right part of the status line.
2540 .It Ic status-right-bg Ar colour
2541 Set the background colour of the right part of the status line.
2542 .It Ic status-right-fg Ar colour
2543 Set the foreground colour of the right part of the status line.
2544 .It Ic status-right-length Ar length
2547 of the right component of the status bar.
2549 .It Xo Ic status-utf8
2554 to treat top-bit-set characters in the
2558 strings as UTF-8; notably, this is important for wide characters.
2559 This option defaults to off.
2560 .It Ic terminal-overrides Ar string
2561 Contains a list of entries which override terminal descriptions read using
2564 is a comma-separated list of items each a colon-separated string made up of a
2565 terminal type pattern (matched using
2571 For example, to set the
2576 for all terminal types and the
2582 terminal type, the option could be set to the string:
2583 .Bd -literal -offset indent
2584 "*:clear=\ee[H\ee[2J,rxvt:dch1=\ee[P"
2587 The terminal entry value is passed through
2589 before interpretation.
2590 The default value forcibly corrects the
2592 entry for terminals which support 88 or 256 colours:
2593 .Bd -literal -offset indent
2594 "*88col*:colors=88,*256col*:colors=256,xterm*:XT"
2596 .It Ic update-environment Ar variables
2597 Set a space-separated string containing a list of environment variables to be
2598 copied into the session environment when a new session is created or an
2599 existing session is attached.
2600 Any variables that do not exist in the source environment are set to be
2601 removed from the session environment (as if
2607 "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID
2609 .It Xo Ic visual-activity
2612 If on, display a status line message when activity occurs in a window
2614 .Ic monitor-activity
2615 window option is enabled.
2616 .It Xo Ic visual-bell
2619 If this option is on, a message is shown on a bell instead of it being passed
2620 through to the terminal (which normally makes a sound).
2624 .It Xo Ic visual-content
2628 .Ic visual-activity ,
2629 display a message when content is present in a window
2632 window option is enabled.
2633 .It Xo Ic visual-silence
2638 is enabled, prints a message after the interval has expired on a given window.
2639 .It Ic word-separators Ar string
2640 Sets the session's conception of what characters are considered word
2641 separators, for the purposes of the next and previous word commands in
2646 .It Xo Ic set-window-option
2648 .Op Fl t Ar target-window
2651 .D1 (alias: Ic setw )
2652 Set a window option.
2660 flags work similarly to the
2664 Supported window options are:
2666 .Bl -tag -width Ds -compact
2667 .It Xo Ic aggressive-resize
2670 Aggressively resize the chosen window.
2673 will resize the window to the size of the smallest session for which it is the
2674 current window, rather than the smallest session to which it is attached.
2675 The window may resize when the current window is changed on another sessions;
2676 this option is good for full-screen programs which support
2678 and poor for interactive programs such as shells.
2680 .It Xo Ic allow-rename
2683 Allow programs to change the window name using a terminal escape
2684 sequence (\\033k...\\033\\\\).
2687 .It Xo Ic alternate-screen
2690 This option configures whether programs running inside
2692 may use the terminal alternate screen feature, which allows the
2698 The alternate screen feature preserves the contents of the window when an
2699 interactive application starts and restores it on exit, so that any output
2700 visible before the application starts reappears unchanged after it exits.
2703 .It Xo Ic automatic-rename
2706 Control automatic window renaming.
2707 When this setting is enabled,
2709 will attempt - on supported platforms - to rename the window to reflect the
2710 command currently running in it.
2711 This flag is automatically disabled for an individual window when a name
2712 is specified at creation with
2718 or with a terminal escape sequence.
2719 It may be switched off globally with:
2720 .Bd -literal -offset indent
2721 set-window-option -g automatic-rename off
2724 .It Ic c0-change-interval Ar interval
2725 .It Ic c0-change-trigger Ar trigger
2726 These two options configure a simple form of rate limiting for a pane.
2731 C0 sequences that modify the screen (for example, carriage returns, linefeeds
2732 or backspaces) in one millisecond, it will stop updating the pane immediately and
2733 instead redraw it entirely every
2736 This helps to prevent fast output (such as
2738 overwhelming the terminal).
2739 The default is a trigger of 250 and an interval of 100.
2740 A trigger of zero disables the rate limiting.
2742 .It Ic clock-mode-colour Ar colour
2745 .It Xo Ic clock-mode-style
2748 Set clock hour format.
2750 .It Ic force-height Ar height
2751 .It Ic force-width Ar width
2754 from resizing a window to greater than
2758 A value of zero restores the default unlimited setting.
2760 .It Ic main-pane-height Ar height
2761 .It Ic main-pane-width Ar width
2762 Set the width or height of the main (left or top) pane in the
2768 .It Ic mode-attr Ar attributes
2769 Set window modes attributes.
2771 .It Ic mode-bg Ar colour
2772 Set window modes background colour.
2774 .It Ic mode-fg Ar colour
2775 Set window modes foreground colour.
2780 Use vi or emacs-style key bindings in copy and choice modes.
2783 option, the default is emacs, unless
2790 .It Xo Ic mode-mouse
2791 .Op Ic on | off | copy-mode
2793 Mouse state in modes.
2794 If on, the mouse may be used to enter copy mode and copy a selection by
2795 dragging, to enter copy mode and scroll with the mouse wheel, or to select an
2796 option in choice mode.
2799 the mouse behaves as set to on, but cannot be used to enter copy
2802 .It Xo Ic monitor-activity
2805 Monitor for activity in the window.
2806 Windows with activity are highlighted in the status line.
2808 .It Ic monitor-content Ar match-string
2809 Monitor content in the window.
2814 appears in the window, it is highlighted in the status line.
2816 .It Xo Ic monitor-silence
2819 Monitor for silence (no activity) in the window within
2822 Windows that have been silent for the interval are highlighted in the
2824 An interval of zero disables the monitoring.
2826 .It Ic other-pane-height Ar height
2827 Set the height of the other panes (not the main pane) in the
2830 If this option is set to 0 (the default), it will have no effect.
2832 .Ic main-pane-height
2834 .Ic other-pane-height
2835 options are set, the main pane will grow taller to make the other panes the
2836 specified height, but will never shrink to do so.
2838 .It Ic other-pane-width Ar width
2840 .Ic other-pane-height ,
2841 but set the width of other panes in the
2845 .It Ic pane-base-index Ar index
2848 but set the starting index for pane numbers.
2850 .It Xo Ic remain-on-exit
2853 A window with this flag set is not destroyed when the program running in it
2855 The window may be reactivated with the
2859 .It Xo Ic synchronize-panes
2862 Duplicate input to any pane to all other panes in the same window (only
2863 for panes that are not in any special mode).
2870 to expect UTF-8 sequences to appear in this window.
2872 .It Ic window-status-bell-attr Ar attributes
2873 Set status line attributes for windows which have a bell alert.
2875 .It Ic window-status-bell-bg Ar colour
2876 Set status line background colour for windows with a bell alert.
2878 .It Ic window-status-bell-fg Ar colour
2879 Set status line foreground colour for windows with a bell alert.
2881 .It Ic window-status-content-attr Ar attributes
2882 Set status line attributes for windows which have a content alert.
2884 .It Ic window-status-content-bg Ar colour
2885 Set status line background colour for windows with a content alert.
2887 .It Ic window-status-content-fg Ar colour
2888 Set status line foreground colour for windows with a content alert.
2890 .It Ic window-status-activity-attr Ar attributes
2891 Set status line attributes for windows which have an activity (or silence) alert.
2893 .It Ic window-status-activity-bg Ar colour
2894 Set status line background colour for windows with an activity alert.
2896 .It Ic window-status-activity-fg Ar colour
2897 Set status line foreground colour for windows with an activity alert.
2899 .It Ic window-status-attr Ar attributes
2900 Set status line attributes for a single window.
2902 .It Ic window-status-bg Ar colour
2903 Set status line background colour for a single window.
2905 .It Ic window-status-current-attr Ar attributes
2906 Set status line attributes for the currently active window.
2908 .It Ic window-status-current-bg Ar colour
2909 Set status line background colour for the currently active window.
2911 .It Ic window-status-current-fg Ar colour
2912 Set status line foreground colour for the currently active window.
2914 .It Ic window-status-current-format Ar string
2916 .Ar window-status-format ,
2917 but is the format used when the window is the current window.
2919 .It Ic window-status-last-attr Ar attributes
2920 Set status line attributes for the last active window.
2922 .It Ic window-status-last-bg Ar colour
2923 Set status line background colour for the last active window.
2925 .It Ic window-status-last-fg Ar colour
2926 Set status line foreground colour for the last active window.
2928 .It Ic window-status-fg Ar colour
2929 Set status line foreground colour for a single window.
2931 .It Ic window-status-format Ar string
2932 Set the format in which the window is displayed in the status line window list.
2935 option for details of special character sequences available.
2939 .It Ic window-status-separator Ar string
2940 Sets the separator drawn between windows in the status line.
2941 The default is a single space character.
2943 .It Xo Ic xterm-keys
2946 If this option is set,
2950 function key sequences; these have a number included to indicate modifiers such
2951 as Shift, Alt or Ctrl.
2954 .It Xo Ic wrap-search
2957 If this option is set, searches will wrap around the end of the pane contents.
2960 .It Xo Ic show-options
2962 .Op Fl t Ar target-session | Ar target-window
2965 .D1 (alias: Ic show )
2966 Show the window options (or a single window option if given) with
2969 .Ic show-window-options ) ,
2970 the server options with
2972 otherwise the session options for
2973 .Ar target session .
2974 Global session or window options are listed if
2978 shows only the option value, not the name.
2981 is set, no error will be returned if
2984 .It Xo Ic show-window-options
2986 .Op Fl t Ar target-window
2989 .D1 (alias: Ic showw )
2990 List the window options or a single option for
2992 or the global window options if
2996 shows only the option value, not the name.
2999 Certain commands accept the
3004 This is a string which controls the output format of the command.
3005 Replacement variables are enclosed in
3010 .Ql #{session_name} .
3011 Some variables also have an shorter alias such as
3013 Conditionals are also accepted by prefixing with
3015 and separating two alternatives with a comma;
3016 if the specified variable exists and is not zero, the first alternative
3017 is chosen, otherwise the second is used.
3019 .Ql #{?session_attached,attached,not attached}
3020 will include the string
3022 if the session is attached and the string
3024 if it is unattached.
3026 The following variables are available, where appropriate:
3027 .Bl -column "XXXXXXXXXXXXXXXXXXX" "XXXXX"
3028 .It Sy "Variable name" Ta Sy "Alias" Ta Sy "Replaced with"
3029 .It Li "alternate_on" Ta "" Ta "If pane is in alternate screen"
3030 .It Li "alternate_saved_x" Ta "" Ta "Saved cursor X in alternate screen"
3031 .It Li "alternate_saved_y" Ta "" Ta "Saved cursor Y in alternate screen"
3032 .It Li "buffer_sample" Ta "" Ta "First 50 characters from buffer"
3033 .It Li "buffer_size" Ta "" Ta "Size of the specified buffer in bytes"
3034 .It Li "client_activity" Ta "" Ta "Integer time client last had activity"
3035 .It Li "client_activity_string" Ta "" Ta "String time client last had activity"
3036 .It Li "client_created" Ta "" Ta "Integer time client created"
3037 .It Li "client_created_string" Ta "" Ta "String time client created"
3038 .It Li "client_cwd" Ta "" Ta "Working directory of client"
3039 .It Li "client_height" Ta "" Ta "Height of client"
3040 .It Li "client_last_session" Ta "" Ta "Name of the client's last session"
3041 .It Li "client_prefix" Ta "" Ta "1 if prefix key has been pressed"
3042 .It Li "client_readonly" Ta "" Ta "1 if client is readonly"
3043 .It Li "client_session" Ta "" Ta "Name of the client's session"
3044 .It Li "client_termname" Ta "" Ta "Terminal name of client"
3045 .It Li "client_tty" Ta "" Ta "Pseudo terminal of client"
3046 .It Li "client_utf8" Ta "" Ta "1 if client supports utf8"
3047 .It Li "client_width" Ta "" Ta "Width of client"
3048 .It Li "cursor_flag" Ta "" Ta "Pane cursor flag"
3049 .It Li "cursor_x" Ta "" Ta "Cursor X position in pane"
3050 .It Li "cursor_y" Ta "" Ta "Cursor Y position in pane"
3051 .It Li "history_bytes" Ta "" Ta "Number of bytes in window history"
3052 .It Li "history_limit" Ta "" Ta "Maximum window history lines"
3053 .It Li "history_size" Ta "" Ta "Size of history in bytes"
3054 .It Li "host" Ta "#H" Ta "Hostname of local host"
3055 .It Li "host_short" Ta "#h" Ta "Hostname of local host (no domain name)"
3056 .It Li "insert_flag" Ta "" Ta "Pane insert flag"
3057 .It Li "keypad_cursor_flag" Ta "" Ta "Pane keypad cursor flag"
3058 .It Li "keypad_flag" Ta "" Ta "Pane keypad flag"
3059 .It Li "line" Ta "" Ta "Line number in the list"
3060 .It Li "mouse_any_flag" Ta "" Ta "Pane mouse any flag"
3061 .It Li "mouse_button_flag" Ta "" Ta "Pane mouse button flag"
3062 .It Li "mouse_standard_flag" Ta "" Ta "Pane mouse standard flag"
3063 .It Li "mouse_utf8_flag" Ta "" Ta "Pane mouse UTF-8 flag"
3064 .It Li "pane_active" Ta "" Ta "1 if active pane"
3065 .It Li "pane_current_command" Ta "" Ta "Current command if available"
3066 .It Li "pane_current_path" Ta "" Ta "Current path if available"
3067 .It Li "pane_dead" Ta "" Ta "1 if pane is dead"
3068 .It Li "pane_height" Ta "" Ta "Height of pane"
3069 .It Li "pane_id" Ta "#D" Ta "Unique pane ID"
3070 .It Li "pane_in_mode" Ta "" Ta "If pane is in a mode"
3071 .It Li "pane_index" Ta "#P" Ta "Index of pane"
3072 .It Li "pane_pid" Ta "" Ta "PID of first process in pane"
3073 .It Li "pane_start_command" Ta "" Ta "Command pane started with"
3074 .It Li "pane_start_path" Ta "" Ta "Path pane started with"
3075 .It Li "pane_tabs" Ta "" Ta "Pane tab positions"
3076 .It Li "pane_title" Ta "#T" Ta "Title of pane"
3077 .It Li "pane_tty" Ta "" Ta "Pseudo terminal of pane"
3078 .It Li "pane_width" Ta "" Ta "Width of pane"
3079 .It Li "saved_cursor_x" Ta "" Ta "Saved cursor X in pane"
3080 .It Li "saved_cursor_y" Ta "" Ta "Saved cursor Y in pane"
3081 .It Li "scroll_region_lower" Ta "" Ta "Bottom of scroll region in pane"
3082 .It Li "scroll_region_upper" Ta "" Ta "Top of scroll region in pane"
3083 .It Li "session_attached" Ta "" Ta "1 if session attached"
3084 .It Li "session_created" Ta "" Ta "Integer time session created"
3085 .It Li "session_created_string" Ta "" Ta "String time session created"
3086 .It Li "session_group" Ta "" Ta "Number of session group"
3087 .It Li "session_grouped" Ta "" Ta "1 if session in a group"
3088 .It Li "session_height" Ta "" Ta "Height of session"
3089 .It Li "session_id" Ta "" Ta "Unique session ID"
3090 .It Li "session_name" Ta "#S" Ta "Name of session"
3091 .It Li "session_width" Ta "" Ta "Width of session"
3092 .It Li "session_windows" Ta "" Ta "Number of windows in session"
3093 .It Li "window_active" Ta "" Ta "1 if window active"
3094 .It Li "window_find_matches" Ta "" Ta "Matched data from the find-window"
3095 .It Li "window_flags" Ta "#F" Ta "Window flags"
3096 .It Li "window_height" Ta "" Ta "Height of window"
3097 .It Li "window_id" Ta "" Ta "Unique window ID"
3098 .It Li "window_index" Ta "#I" Ta "Index of window"
3099 .It Li "window_layout" Ta "" Ta "Window layout description"
3100 .It Li "window_name" Ta "#W" Ta "Name of window"
3101 .It Li "window_panes" Ta "" Ta "Number of panes in window"
3102 .It Li "window_width" Ta "" Ta "Width of window"
3103 .It Li "wrap_flag" Ta "" Ta "Pane wrap flag"
3105 .Sh NAMES AND TITLES
3107 distinguishes between names and titles.
3108 Windows and sessions have names, which may be used to specify them in targets
3109 and are displayed in the status line and various lists: the name is the
3111 identifier for a window or session.
3112 Only panes have titles.
3113 A pane's title is typically set by the program running inside the pane and
3116 It is the same mechanism used to set for example the
3121 Windows themselves do not have titles - a window's title is the title of its
3124 itself may set the title of the terminal in which the client is running, see
3129 A session's name is set with the
3134 A window's name is set with one of:
3137 A command argument (such as
3145 .Bd -literal -offset indent
3146 $ printf '\e033kWINDOW_NAME\e033\e\e'
3149 Automatic renaming, which sets the name to the active command in the window's
3152 .Ic automatic-rename
3156 When a pane is first created, its title is the hostname.
3157 A pane's title can be set via the OSC title setting sequence, for example:
3158 .Bd -literal -offset indent
3159 $ printf '\e033]2;My Title\e033\e\e'
3162 When the server is started,
3164 copies the environment into the
3165 .Em global environment ;
3166 in addition, each session has a
3167 .Em session environment .
3168 When a window is created, the session and global environments are merged.
3169 If a variable exists in both, the value from the session environment is used.
3170 The result is the initial environment passed to the new process.
3173 .Ic update-environment
3174 session option may be used to update the session environment from the client
3175 when a new session is created or an old reattached.
3177 also initialises the
3179 variable with some internal information to allow commands to be executed
3180 from inside, and the
3182 variable with the correct terminal setting of
3185 Commands to alter and view the environment are:
3187 .It Xo Ic set-environment
3189 .Op Fl t Ar target-session
3190 .Ar name Op Ar value
3192 .D1 (alias: Ic setenv )
3193 Set or unset an environment variable.
3196 is used, the change is made in the global environment; otherwise, it is applied
3197 to the session environment for
3198 .Ar target-session .
3201 flag unsets a variable.
3203 indicates the variable is to be removed from the environment before starting a
3205 .It Xo Ic show-environment
3207 .Op Fl t Ar target-session
3210 .D1 (alias: Ic showenv )
3211 Display the environment for
3213 or the global environment with
3217 is omitted, all variables are shown.
3218 Variables removed from the environment are prefixed with
3223 includes an optional status line which is displayed in the bottom line of each
3225 By default, the status line is enabled (it may be disabled with the
3227 session option) and contains, from left-to-right: the name of the current
3228 session in square brackets; the window list; the title of the active pane
3229 in double quotes; and the time and date.
3231 The status line is made of three parts: configurable left and right sections
3232 (which may contain dynamic content such as the time or output from a shell
3235 .Ic status-left-length ,
3238 .Ic status-right-length
3239 options below), and a central window list.
3240 By default, the window list shows the index, name and (if any) flag of the
3241 windows present in the current session in ascending numerical order.
3242 It may be customised with the
3243 .Ar window-status-format
3245 .Ar window-status-current-format
3247 The flag is one of the following symbols appended to the window name:
3248 .Bl -column "Symbol" "Meaning" -offset indent
3249 .It Sy "Symbol" Ta Sy "Meaning"
3250 .It Li "*" Ta "Denotes the current window."
3251 .It Li "-" Ta "Marks the last window (previously selected)."
3252 .It Li "#" Ta "Window is monitored and activity has been detected."
3253 .It Li "!" Ta "A bell has occurred in the window."
3254 .It Li "+" Ta "Window is monitored for content and it has appeared."
3255 .It Li "~" Ta "The window has been silent for the monitor-silence interval."
3256 .It Li "Z" Ta "The window's active pane is zoomed."
3259 The # symbol relates to the
3260 .Ic monitor-activity
3264 The window name is printed in inverted colours if an alert (bell, activity or
3265 content) is present.
3267 The colour and attributes of the status line may be configured, the entire
3268 status line using the
3273 session options and individual windows using the
3274 .Ic window-status-attr ,
3275 .Ic window-status-fg
3277 .Ic window-status-bg
3280 The status line is automatically refreshed at interval if it has changed, the
3281 interval may be controlled with the
3285 Commands related to the status line are as follows:
3287 .It Xo Ic command-prompt
3290 .Op Fl t Ar target-client
3293 Open the command prompt in a client.
3294 This may be used from inside
3296 to execute commands interactively.
3300 is specified, it is used as the command.
3303 is a comma-separated list of the initial text for each prompt.
3308 is a comma-separated list of prompts which are displayed in order; otherwise
3309 a single prompt is displayed, constructed from
3311 if it is present, or
3319 may contain the special character sequences supported by the
3323 Before the command is executed, the first occurrence of the string
3325 and all occurrences of
3327 are replaced by the response to the first prompt, the second
3331 are replaced with the response to the second prompt, and so on for further
3333 Up to nine prompt responses may be replaced
3339 .It Xo Ic confirm-before
3341 .Op Fl t Ar target-client
3344 .D1 (alias: Ic confirm )
3345 Ask for confirmation before executing
3351 is the prompt to display; otherwise a prompt is constructed from
3353 It may contain the special character sequences supported by the
3357 This command works only from inside
3359 .It Xo Ic display-message
3361 .Op Fl c Ar target-client
3362 .Op Fl t Ar target-pane
3365 .D1 (alias: Ic display )
3369 is given, the output is printed to stdout, otherwise it is displayed in the
3376 section; information is taken from
3380 is given, otherwise the active pane for the session attached to
3385 maintains a stack of
3387 Up to the value of the
3389 option are kept; when a new buffer is added, the buffer at the bottom of the
3391 Buffers may be added using
3395 command, and pasted into a window using the
3399 A configurable history buffer is also maintained for each window.
3400 By default, up to 2000 lines are kept; this can be altered with the
3406 The buffer commands are as follows:
3411 .Op Fl t Ar target-window
3414 Put a window into buffer choice mode, where a buffer may be chosen
3415 interactively from a list.
3416 After a buffer is selected,
3418 is replaced by the buffer index in
3420 and the result executed as a command.
3423 is not given, "paste-buffer -b '%%'" is used.
3424 For the meaning of the
3429 This command works only if at least one client is attached.
3430 .It Ic clear-history Op Fl t Ar target-pane
3431 .D1 (alias: Ic clearhist )
3432 Remove and free the history for the specified pane.
3433 .It Ic delete-buffer Op Fl b Ar buffer-index
3434 .D1 (alias: Ic deleteb )
3435 Delete the buffer at
3437 or the top buffer if not specified.
3438 .It Xo Ic list-buffers
3441 .D1 (alias: Ic lsb )
3442 List the global buffers.
3443 For the meaning of the
3448 .It Xo Ic load-buffer
3449 .Op Fl b Ar buffer-index
3452 .D1 (alias: Ic loadb )
3453 Load the contents of the specified paste buffer from
3455 .It Xo Ic paste-buffer
3457 .Op Fl b Ar buffer-index
3458 .Op Fl s Ar separator
3459 .Op Fl t Ar target-pane
3461 .D1 (alias: Ic pasteb )
3462 Insert the contents of a paste buffer into the specified pane.
3463 If not specified, paste into the current one.
3466 also delete the paste buffer from the stack.
3467 When output, any linefeed (LF) characters in the paste buffer are replaced with
3468 a separator, by default carriage return (CR).
3469 A custom separator may be specified using the
3474 flag means to do no replacement (equivalent to a separator of LF).
3477 is specified, paste bracket control codes are inserted around the
3478 buffer if the application has requested bracketed paste mode.
3479 .It Xo Ic save-buffer
3481 .Op Fl b Ar buffer-index
3484 .D1 (alias: Ic saveb )
3485 Save the contents of the specified paste buffer to
3489 option appends to rather than overwriting the file.
3490 .It Xo Ic set-buffer
3491 .Op Fl b Ar buffer-index
3494 .D1 (alias: Ic setb )
3495 Set the contents of the specified buffer to
3497 .It Xo Ic show-buffer
3498 .Op Fl b Ar buffer-index
3500 .D1 (alias: Ic showb )
3501 Display the contents of the specified buffer.
3504 Miscellaneous commands are as follows:
3506 .It Ic clock-mode Op Fl t Ar target-pane
3507 Display a large clock.
3510 .Op Fl t Ar target-pane
3511 .Ar shell-command command
3519 returns success or the second
3522 Before being executed, shell-command is expanded using the rules specified in the
3524 section, including those relevant to
3529 is run in the background.
3531 .D1 (alias: Ic lock )
3532 Lock each client individually by running the command specified by the
3537 .Op Fl t Ar target-pane
3540 .D1 (alias: Ic run )
3543 in the background without creating a window.
3544 Before being executed, shell-command is expanded using the rules specified in
3550 the command is run in the background.
3551 After it finishes, any output to stdout is displayed in copy mode (in the pane
3554 or the current pane if omitted).
3555 If the command doesn't return success, the exit status is also displayed.
3557 .D1 (alias: Ic info )
3558 Show server information and terminal details.
3563 .D1 (alias: Ic wait )
3564 When used without options, prevents the client from exiting until woken using
3567 with the same channel.
3570 is used, the channel is locked and any clients that try to lock the same
3571 channel are made to wait until the channel is unlocked with
3574 This command only works from outside
3577 .Sh TERMINFO EXTENSIONS
3579 understands some extensions to
3583 Set the cursor colour.
3584 The first takes a single string argument and is used to set the colour;
3585 the second takes no arguments and restores the default cursor colour.
3586 If set, a sequence such as this may be used
3587 to change the cursor colour from inside
3589 .Bd -literal -offset indent
3590 $ printf '\e033]12;red\e033\e\e'
3593 Change the cursor style.
3594 If set, a sequence such as this may be used
3595 to change the cursor to an underline:
3596 .Bd -literal -offset indent
3597 $ printf '\e033[4 q'
3602 is set, it will be used to reset the cursor style instead
3606 This sequence can be used by
3608 to store the current buffer in the host terminal's selection (clipboard).
3611 option above and the
3617 offers a textual interface called
3619 This allows applications to communicate with
3621 using a simple text-only protocol.
3623 In control mode, a client sends
3625 commands or command sequences terminated by newlines on standard input.
3626 Each command will produce one block of output on standard output.
3627 An output block consists of a
3629 line followed by the output (which may be empty).
3630 The output block ends with a
3639 have two arguments: an integer time (as seconds from epoch) and command number.
3641 .Bd -literal -offset indent
3643 0: ksh* (1 panes) [80x24] [layout b25f,80x24,0,0,2] @2 (active)
3649 outputs notifications.
3650 A notification will never occur inside an output block.
3652 The following notifications are defined:
3654 .It Ic %exit Op Ar reason
3657 client is exiting immediately, either because it is not attached to any session
3658 or an error occurred.
3661 describes why the client exited.
3662 .It Ic %layout-change Ar window-id Ar window-layout
3663 The layout of a window with ID
3668 .It Ic %output Ar pane-id Ar value
3669 A window pane produced output.
3671 escapes non-printable characters and backslash as octal \\xxx.
3672 .It Ic %session-changed Ar session-id Ar name
3673 The client is now attached to the session with ID
3677 .It Ic %session-renamed Ar name
3678 The current session was renamed to
3680 .It Ic %sessions-changed
3681 A session was created or destroyed.
3682 .It Ic %unlinked-window-add Ar window-id
3685 was created but is not linked to the current session.
3686 .It Ic %window-add Ar window-id
3689 was linked to the current session.
3690 .It Ic %window-close Ar window-id
3694 .It Ic %window-renamed Ar window-id Ar name
3701 .Bl -tag -width "/etc/tmux.confXXX" -compact
3706 .It Pa /etc/tmux.conf
3707 System-wide configuration file.
3715 .Dl $ tmux new-session vi
3717 Most commands have a shorter form, known as an alias.
3718 For new-session, this is
3723 Alternatively, the shortest unambiguous form of a command is accepted.
3724 If there are several options, they are listed:
3725 .Bd -literal -offset indent
3727 ambiguous command: n, could be: new-session, new-window, next-window
3730 Within an active session, a new window may be created by typing
3740 Windows may be navigated with:
3742 (to select window 0),
3744 (to select window 1), and so on;
3746 to select the next window; and
3748 to select the previous window.
3750 A session may be detached using
3752 (or by an external event such as
3754 disconnection) and reattached with:
3756 .Dl $ tmux attach-session
3760 lists the current key bindings in the current window; up and down may be used
3761 to navigate the list or
3765 Commands to be run when the
3767 server is started may be placed in the
3770 Common examples include:
3772 Changing the default prefix key:
3773 .Bd -literal -offset indent
3774 set-option -g prefix C-a
3776 bind-key C-a send-prefix
3779 Turning the status line off, or changing its colour:
3780 .Bd -literal -offset indent
3781 set-option -g status off
3782 set-option -g status-bg blue
3785 Setting other options, such as the default command,
3786 or locking after 30 minutes of inactivity:
3787 .Bd -literal -offset indent
3788 set-option -g default-command "exec /bin/ksh"
3789 set-option -g lock-after-time 1800
3792 Creating new key bindings:
3793 .Bd -literal -offset indent
3794 bind-key b set-option status
3795 bind-key / command-prompt "split-window 'exec man %%'"
3796 bind-key S command-prompt "new-window -n %1 'ssh %1'"
3801 .An Nicholas Marriott Aq nicm@users.sourceforge.net