neulab/tldr huggingface dataset:
WheelUp       WheelDown MouseDown1    MouseUp1      MouseDrag1   MouseDragEnd1 MouseDown2    MouseUp2      MouseDrag2   MouseDragEnd2 MouseDown3    MouseUp3      MouseDrag3   MouseDragEnd3 SecondClick1  SecondClick2  SecondClick3 DoubleClick1  DoubleClick2  DoubleClick3 TripleClick1  TripleClick2  TripleClick3
The ‘SecondClick’ events are fired for the second click of a double click, even if there may be a third click which will fire ‘TripleClick’ instead of ‘DoubleClick’.
Each should be suffixed with a location, for example ‘MouseDown1Status’.
The special token ‘{mouse}’ or ‘=’ may be used as target-window or target-pane in commands bound to mouse key bindings.  It resolves to the window or pane over which the mouse event took place (for example, the window in the status line over which button 1 was released for a ‘MouseUp1Status’ binding, or the pane over which the wheel was scrolled for a ‘WheelDownPane’ binding).
The send-keys -M flag may be used to forward a mouse event to a pane.
The default key bindings allow the mouse to be used to select and resize panes, to copy text and to change window using the status line.  These take effect if the mouse option is turned on.
Certain commands accept the -F flag with a format argument.  This is a string which controls the output format of the command.  Format variables are enclosed in ‘#{’ and ‘}’, for example ‘#{session_name}’.  The possible variables are listed in the table below, or the name of a tmux option may be used for an option's value.  Some variables have a shorter alias such as ‘#S’; ‘##’ is replaced by a single ‘#’, ‘#,’ by a ‘,’ and ‘#}’ by a ‘}’.
Conditionals are available by prefixing with ‘?’ and separating two alternatives with a comma; if the specified variable exists and is not zero, the first alternative is chosen, otherwise the second is used.  For example ‘#{?session_attached,attached,not attached}’ will include the string ‘attached’ if the session is attached and the string ‘not attached’ if it is unattached, or ‘#{?automatic-rename,yes,no}’ will include ‘yes’ if automatic-rename is enabled, or ‘no’ if not.  Conditionals can be nested arbitrarily.  Inside a conditional, ‘,’ and ‘}’ must be escaped as ‘#,’ and ‘#}’, unless they are part of a ‘#{...}’ replacement.  For example:
#{?pane_in_mode,#[fg=white#,bg=red],#[fg=red#,bg=white]}#W .
String comparisons may be expressed by prefixing two comma-separated alternatives by ‘==’, ‘!=’, ‘<’, ‘>’, ‘<=’ or ‘>=’ and a colon.  For example ‘#{==:#{host},myhost}’ will be replaced by ‘1’ if running on ‘myhost’, otherwise by ‘0’.  ‘||’ and ‘&&’ evaluate to true if either or both of two comma-separated alternatives are true, for example ‘#{||:#{pane_in_mode},#{alternate_on}}’.
An ‘m’ specifies an fnmatch(3) or regular expression comparison.  The first argument is the pattern and the second the string to compare.  An optional argument specifies flags: ‘r’ means the pattern is a regular expression instead of the default fnmatch(3) pattern, and ‘i’ means to ignore case. For example: ‘#{m:*foo*,#{host}}’ or ‘#{m/ri:^A,MYVAR}’.  A ‘C’ performs a search for an fnmatch(3) pattern or regular expression in the pane content and evaluates to zero if not found, or a line number if found.  Like ‘m’, an ‘r’ flag means search for a regular expression and ‘i’ ignores case. For example: ‘#{C/r:^Start}’
Numeric operators may be performed by prefixing two comma-separated alternatives with an ‘e’ and an operator.  An optional ‘f’ flag may be given after the operator to use floating point numbers, otherwise integers are used.  This may be followed by a number giving the number of decimal places to use for the result.  The available operators are: addition ‘+’, subtraction ‘-’, multiplication ‘*’, division ‘/’, modulus ‘m’ or ‘%’ (note that ‘%’ must be escaped as ‘%%’ in formats which are also expanded by strftime(3)) and numeric comparison operators ‘==’, ‘!=’, ‘<’, ‘<=’, ‘>’ and ‘>=’.  For example, ‘#{e|*|f|4:5.5,3}’ multiplies 5.5 by 3 for a result with four decimal places and ‘#{e|%%:7,3}’ returns the modulus of 7 and 3. ‘a’ replaces a numeric argument by its ASCII equivalent, so ‘#{a:98}’ results in ‘b’.
A limit may be placed on the length of the resultant string by prefixing it by an ‘=’, a number and a colon.  Positive numbers count from the start of the string and negative from the end, so ‘#{=5:pane_title}’ will include at most the first five characters of the pane title, or ‘#{=-5:pane_title}’ the last five characters.  A suffix or prefix may be given as a second argument - if provided then it is appended or prepended to the string if the length has been trimmed, for example ‘#{=/5/...:pane_title}’ will append ‘...’ if the pane title is more than five characters.  Similarly, ‘p’ pads the string to a given width, for example ‘#{p10:pane_title}’ will result in a width of at least 10 characters.  A positive width pads on the left, a negative on the right.  ‘n’ expands to the length of the variable and ‘w’ to its width when displayed, for example ‘#{n:window_name}’.
Prefixing a time variable with ‘t:’ will convert it to a string, so if ‘#{window_activity}’ gives ‘1445765102’, ‘#{t:window_activity}’ gives ‘Sun Oct 25 09:25:02 2015’.  Adding ‘p (’ ‘`t/p`’) will use shorter but less accurate time format for times in the past.  A custom format may be given using an ‘f’ suffix (note that ‘%’ must be escaped as ‘%%’ if the format is separately being passed through strftime(3), for example in the status-left option): ‘#{t/f/%%H#:%%M:window_activity}’, see strftime(3).
The ‘b:’ and ‘d:’ prefixes are basename(3) and dirname(3) of the variable respectively.  ‘q:’ will escape sh(1) special characters or with a ‘h’ suffix, escape hash characters (so ‘#’ becomes ‘##’).  ‘E:’ will expand the format twice, for example ‘#{E:status-left}’ is the result of expanding the content of the status-left option rather than the option itself.  ‘T:’ is like ‘E:’ but also expands strftime(3) specifiers.  ‘S:’, ‘W:’ or ‘P:’ will loop over each session, window or pane and insert the format once for each. For windows and panes, two comma-separated formats may be given: the second is used for the current window or active pane.  For example, to get a list of windows formatted like the status line:
#{W:#{E:window-status-format} ,#{E:window-status-current-format} }
‘N:’ checks if a window (without any suffix or with the ‘w’ suffix) or a session (with the ‘s’ suffix) name exists, for example ‘`N/w:foo`’ is replaced with 1 if a window named ‘foo’ exists.
A prefix of the form ‘s/foo/bar/:’ will substitute ‘foo’ with ‘bar’ throughout.  The first argument may be an extended regular expression and a final argument may be ‘i’ to ignore case, for example ‘s/a(.)/\1x/i:’ would change ‘abABab’ into ‘bxBxbx’.
In addition, the last line of a shell command's output may be inserted using ‘#()’.  For example, ‘#(uptime)’ will insert the system's uptime. When constructing formats, tmux does not wait for ‘#()’ commands to finish; instead, the previous result from running the same command is used, or a placeholder if the command has not been run before.  If the command hasn't exited, the most recent line of output will be used, but the status line will not be updated more than once a second.  Commands are executed with the tmux global environment set (see the GLOBAL AND SESSION ENVIRONMENT section).
An ‘l’ specifies that a string should be interpreted literally and not expanded.  For example ‘#{l:#{?pane_in_mode,yes,no}}’ will be replaced by ‘#{?pane_in_mode,yes,no}’.
The following variables are available, where appropriate:
tmux offers various options to specify the colour and attributes of aspects of the interface, for example status-style for the status line.  In addition, embedded styles may be specified in format options, such as status-left, by enclosing them in ‘#[’ and ‘]’.
A style may be the single term ‘default’ to specify the default style (which may come from an option, for example status-style in the status line) or a space or comma separated list of the following:
fg=colour Set the foreground colour.  The colour is one of: black, red, green, yellow, blue, magenta, cyan, white; if supported the bright variants brightred, brightgreen, brightyellow; colour0 to colour255 from the 256-colour set; default for the default colour; terminal for the terminal default colour; or a hexadecimal RGB string such as ‘#ffffff’.
bg=colour Set the background colour.
none    Set no attributes (turn off any active attributes).
acs, bright (or bold), dim, underscore, blink, reverse, hidden, italics, overline, strikethrough, double-underscore, curly-underscore, dotted-underscore, dashed-underscore Set an attribute.  Any of the attributes may be prefixed with ‘no’ to unset.  acs is the terminal alternate character set.
align=left (or noalign), align=centre, align=right Align text to the left, centre or right of the available space if appropriate.
fill=colour Fill the available space with a background colour if appropriate.
list=on, list=focus, list=left-marker, list=right-marker, nolist Mark the position of the various window list components in the status-format option: list=on marks the start of the list; list=focus is the part of the list that should be kept in focus if the entire list won't fit in the available space (typically the current window); list=left-marker and list=right-marker mark the text to be used to mark that text has been trimmed from the left or right of the list if there is not enough space.
push-default, pop-default Store the current colours and attributes as the default or reset to the previous default.  A push-default affects any subsequent use of the default term until a pop-default.  Only one default may be pushed (each push-default replaces the previous saved default).
range=left, range=right, range=window|X, norange Mark a range in the status-format option.  range=left and range=right are the text used for the ‘StatusLeft’ and ‘StatusRight’ mouse keys.  range=window|X is the range for a window passed to the ‘Status’ mouse key, where ‘X’ is a window index.
fg=yellow bold underscore blink bg=black,fg=default,noreverse
tmux distinguishes between names and titles.  Windows and sessions have names, which may be used to specify them in targets and are displayed in the status line and various lists: the name is the tmux identifier for a window or session.  Only panes have titles.  A pane's title is typically set by the program running inside the pane using an escape sequence (like it would set the xterm(1) window title in X(7)).  Windows themselves do not have titles - a window's title is the title of its active pane.  tmux itself may set the title of the terminal in which the client is running, see the set-titles option.
A session's name is set with the new-session and rename-session commands. A window's name is set with one of:
1.      A command argument (such as -n for new-window or new-session).
2.      An escape sequence (if the allow-rename option is turned on):
$ printf '\033kWINDOW_NAME\033\\'
3.      Automatic renaming, which sets the name to the active command in the window's active pane.  See the automatic-rename option.
When a pane is first created, its title is the hostname.  A pane's title can be set via the title setting escape sequence, for example:
$ printf '\033]2;My Title\033\\'
It can also be modified with the select-pane -T command.
When the server is started, tmux copies the environment into the global environment; in addition, each session has a session environment.  When a window is created, the session and global environments are merged.  If a variable exists in both, the value from the session environment is used. The result is the initial environment passed to the new process.
The update-environment session option may be used to update the session environment from the client when a new session is created or an old reattached.  tmux also initialises the TMUX variable with some internal information to allow commands to be executed from inside, and the TERM variable with the correct terminal setting of ‘screen’.
Variables in both session and global environments may be marked as hidden. Hidden variables are not passed into the environment of new processes and instead can only be used by tmux itself (for example in formats, see the FORMATS section).
Commands to alter and view the environment are:
set-environment [-Fhgru] [-t target-session] name [value] (alias: setenv) Set or unset an environment variable.  If -g is used, the change is made in the global environment; otherwise, it is applied to the session environment for target-session.  If -F is present, then value is expanded as a format.  The -u flag unsets a variable.  -r indicates the variable is to be removed from the environment before starting a new process.  -h marks the variable as hidden.
show-environment [-hgs] [-t target-session] [variable] (alias: showenv) Display the environment for target-session or the global environment with -g.  If variable is omitted, all variables are shown.  Variables removed from the environment are prefixed with ‘-’.  If -s is used, the output is formatted as a set of Bourne shell commands.  -h shows hidden variables (omitted by default).
tmux includes an optional status line which is displayed in the bottom line of each terminal.
By default, the status line is enabled and one line in height (it may be disabled or made multiple lines with the status session option) and contains, from left-to-right: the name of the current session in square brackets; the window list; the title of the active pane in double quotes; and the time and date.
Each line of the status line is configured with the status-format option. The default is made of three parts: configurable left and right sections (which may contain dynamic content such as the time or output from a shell command, see the status-left, status-left-length, status-right, and status-right-length options below), and a central window list.  By default, the window list shows the index, name and (if any) flag of the windows present in the current session in ascending numerical order.  It may be customised with the window-status-format and window-status-current-format options.  The flag is one of the following symbols appended to the window name:
Symbol    Meaning *         Denotes the current window. -         Marks the last window (previously selected). #         Window activity is monitored and activity has been detected. !         Window bells are monitored and a bell has occurred in the window. ~         The window has been silent for the monitor-silence interval. M         The window contains the marked pane. Z         The window's active pane is zoomed.
The # symbol relates to the monitor-activity window option.  The window name is printed in inverted colours if an alert (bell, activity or silence) is present.
The colour and attributes of the status line may be configured, the entire status line using the status-style session option and individual windows using the window-status-style window option.
The status line is automatically refreshed at interval if it has changed, the interval may be controlled with the status-interval session option.
Commands related to the status line are as follows:
command-prompt [-1ikNTW] [-I inputs] [-p prompts] [-t target-client] [template] Open the command prompt in a client.  This may be used from inside tmux to execute commands interactively.
If template is specified, it is used as the command.  If present, -I is a comma-separated list of the initial text for each prompt. If -p is given, prompts is a comma-separated list of prompts which are displayed in order; otherwise a single prompt is displayed, constructed from template if it is present, or ‘:’ if not.
Before the command is executed, the first occurrence of the string ‘%%’ and all occurrences of ‘%1’ are replaced by the response to the first prompt, all ‘%2’ are replaced with the response to the second prompt, and so on for further prompts.  Up to nine prompt responses may be replaced (‘%1’ to ‘%9’).  ‘%%%’ is like ‘%%’ but any quotation marks are escaped.
-1 makes the prompt only accept one key press, in this case the resulting input is a single character.  -k is like -1 but the key press is translated to a key name.  -N makes the prompt only accept numeric key presses.  -i executes the command every time the prompt input changes instead of when the user exits the command prompt. -T tells tmux that the prompt is for a target which affects what completions are offered when Tab is pressed; -W is similar but indicates the prompt is for a window.
The following keys have a special meaning in the command prompt, depending on the value of the status-keys option:
Function                             vi        emacs Cancel command prompt                q         Escape Delete from cursor to start of word            C-w Delete entire command                d         C-u Delete from cursor to end            D         C-k Execute command                      Enter     Enter Get next command from history                  Down Get previous command from history              Up Insert top paste buffer              p         C-y Look for completions                 Tab       Tab Move cursor left                     h         Left Move cursor right                    l         Right Move cursor to end                   $         C-e Move cursor to next word             w         M-f Move cursor to previous word         b         M-b Move cursor to start                 0         C-a Transpose characters                           C-t
confirm-before [-p prompt] [-t target-client] command (alias: confirm) Ask for confirmation before executing command.  If -p is given, prompt is the prompt to display; otherwise a prompt is constructed from command.  It may contain the special character sequences supported by the status-left option.
This command works only from inside tmux.
display-menu [-O] [-c target-client] [-t target-pane] [-T title] [-x position] [-y position] name key command ... (alias: menu) Display a menu on target-client.  target-pane gives the target for any commands run from the menu.
A menu is passed as a series of arguments: first the menu item name, second the key shortcut (or empty for none) and third the command to run when the menu item is chosen.  The name and command are formats, see the FORMATS and STYLES sections.  If the name begins with a hyphen (-), then the item is disabled (shown dim) and may not be chosen.  The name may be empty for a separator line, in which case both the key and command should be omitted.
-T is a format for the menu title (see FORMATS).
-x and -y give the position of the menu.  Both may be a row or column number, or one of the following special values:
Value    Flag    Meaning C        Both    The centre of the terminal R        -x      The right side of the terminal P        Both    The bottom left of the pane M        Both    The mouse position W        Both    The window position on the status line S        -y      The line above or below the status line
Or a format, which is expanded including the following additional variables:
Variable name                 Replaced with popup_centre_x                Centered in the client popup_centre_y                Centered in the client popup_height                  Height of menu or popup popup_mouse_bottom            Bottom of at the mouse popup_mouse_centre_x          Horizontal centre at the mouse popup_mouse_centre_y          Vertical centre at the mouse popup_mouse_top               Top at the mouse popup_mouse_x                 Mouse X position popup_mouse_y                 Mouse Y position popup_pane_bottom             Bottom of the pane popup_pane_left               Left of the pane popup_pane_right              Right of the pane popup_pane_top                Top of the pane popup_status_line_y           Above or below the status line popup_width                   Width of menu or popup popup_window_status_line_x    At the window position in status line popup_window_status_line_y    At the status line showing the window
Each menu consists of items followed by a key shortcut shown in brackets.  If the menu is too large to fit on the terminal, it is not displayed.  Pressing the key shortcut chooses the corresponding item.  If the mouse is enabled and the menu is opened from a mouse key binding, releasing the mouse button with an item selected chooses that item and releasing the mouse button without an item selected closes the menu.  -O changes this behaviour so that the menu does not close when the mouse button is released without an item selected the menu is not closed and a mouse button must be clicked to choose an item.
The following keys are also available:
Key    Function Enter  Choose selected item Up     Select previous item Down   Select next item q      Exit menu
display-message [-aINpv] [-c target-client] [-d delay] [-t target-pane] [message] (alias: display) Display a message.  If -p is given, the output is printed to stdout, otherwise it is displayed in the target-client status line for up to delay milliseconds.  If delay is not given, the message-time option is used; a delay of zero waits for a key press. ‘N’ ignores key presses and closes only after the delay expires. The format of message is described in the FORMATS section; information is taken from target-pane if -t is given, otherwise the active pane.
-v prints verbose logging as the format is parsed and -a lists the format variables and their values.
-I forwards any input read from stdin to the empty pane given by target-pane.
display-popup [-CE] [-c target-client] [-d start-directory] [-h height] [-t target-pane] [-w width] [-x position] [-y position] [shell-command] (alias: popup) Display a popup running shell-command on target-client.  A popup is a rectangular box drawn over the top of any panes.  Panes are not updated while a popup is present.
-E closes the popup automatically when shell-command exits.  Two -E closes the popup only if shell-command exited with success.
-x and -y give the position of the popup, they have the same meaning as for the display-menu command.  -w and -h give the width and height - both may be a percentage (followed by ‘%’).  If omitted, half of the terminal size is used.
The -C flag closes any popup on the client.
tmux maintains a set of named paste buffers.  Each buffer may be either explicitly or automatically named.  Explicitly named buffers are named when created with the set-buffer or load-buffer commands, or by renaming an automatically named buffer with set-buffer -n.  Automatically named buffers are given a name such as ‘buffer0001’, ‘buffer0002’ and so on.  When the buffer-limit option is reached, the oldest automatically named buffer is deleted.  Explicitly named buffers are not subject to buffer-limit and may be deleted with the delete-buffer command.
Buffers may be added using copy-mode or the set-buffer and load-buffer commands, and pasted into a window using the paste-buffer command.  If a buffer command is used and no buffer is specified, the most recently added automatically named buffer is assumed.
A configurable history buffer is also maintained for each window.  By default, up to 2000 lines are kept; this can be altered with the history-limit option (see the set-option command above).
The buffer commands are as follows:
choose-buffer [-NZr] [-F format] [-f filter] [-K key-format] [-O sort-order] [-t target-pane] [template] Put a pane into buffer mode, where a buffer may be chosen interactively from a list.  Each buffer is shown on one line.  A shortcut key is shown on the left in brackets allowing for immediate choice, or the list may be navigated and an item chosen or otherwise manipulated using the keys below.  -Z zooms the pane. The following keys may be used in buffer mode:
Key    Function Enter  Paste selected buffer Up     Select previous buffer Down   Select next buffer C-s    Search by name or content n      Repeat last search t      Toggle if buffer is tagged T      Tag no buffers C-t    Tag all buffers p      Paste selected buffer P      Paste tagged buffers d      Delete selected buffer D      Delete tagged buffers e      Open the buffer in an editor f      Enter a format to filter items O      Change sort field r      Reverse sort order v      Toggle preview q      Exit mode
After a buffer is chosen, ‘%%’ is replaced by the buffer name in template and the result executed as a command.  If template is not given, "paste-buffer -b '%%'" is used.
-O specifies the initial sort field: one of ‘time’, ‘name’ or ‘size’.  -r reverses the sort order.  -f specifies an initial filter: the filter is a format - if it evaluates to zero, the item in the list is not shown, otherwise it is shown.  If a filter would lead to an empty list, it is ignored.  -F specifies the format for each item in the list and -K a format for each shortcut key; both are evaluated once for each line.  -N starts without the preview. This command works only if at least one client is attached.
clear-history [-t target-pane] (alias: clearhist) Remove and free the history for the specified pane.
delete-buffer [-b buffer-name] (alias: deleteb) Delete the buffer named buffer-name, or the most recently added automatically named buffer if not specified.
list-buffers [-F format] [-f filter] (alias: lsb) List the global buffers.  -F specifies the format of each line and -f a filter.  Only buffers for which the filter is true are shown. See the FORMATS section.
load-buffer [-w] [-b buffer-name] [-t target-client] path (alias: loadb) Load the contents of the specified paste buffer from path.  If -w is given, the buffer is also sent to the clipboard for target-client using the xterm(1) escape sequence, if possible.
paste-buffer [-dpr] [-b buffer-name] [-s separator] [-t target-pane] (alias: pasteb) Insert the contents of a paste buffer into the specified pane.  If not specified, paste into the current one.  With -d, also delete the paste buffer.  When output, any linefeed (LF) characters in the paste buffer are replaced with a separator, by default carriage return (CR).  A custom separator may be specified using the -s flag.  The -r flag means to do no replacement (equivalent to a separator of LF).  If -p is specified, paste bracket control codes are inserted around the buffer if the application has requested bracketed paste mode.
save-buffer [-a] [-b buffer-name] path (alias: saveb) Save the contents of the specified paste buffer to path.  The -a option appends to rather than overwriting the file.
set-buffer [-aw] [-b buffer-name] [-t target-client] [-n new-buffer-name] data (alias: setb) Set the contents of the specified buffer to data.  If -w is given, the buffer is also sent to the clipboard for target-client using the xterm(1) escape sequence, if possible.  The -a option appends to rather than overwriting the buffer.  The -n option renames the buffer to new-buffer-name.
show-buffer [-b buffer-name] (alias: showb) Display the contents of the specified buffer.
Miscellaneous commands are as follows:
clock-mode [-t target-pane] Display a large clock.
if-shell [-bF] [-t target-pane] shell-command command [command] (alias: if) Execute the first command if shell-command returns success or the second command otherwise.  Before being executed, shell-command is expanded using the rules specified in the FORMATS section, including those relevant to target-pane.  With -b, shell-command is run in the background.
If -F is given, shell-command is not executed but considered success if neither empty nor zero (after formats are expanded).
lock-server (alias: lock) Lock each client individually by running the command specified by the lock-command option.
run-shell [-bC] [-d delay] [-t target-pane] [shell-command] (alias: run) Execute shell-command or (with -C) a tmux command in the background without creating a window.  Before being executed, shell-command is expanded using the rules specified in the FORMATS section.  With -b, the command is run in the background.  -d waits for delay seconds before starting the command.  If -C is not given, any output to stdout is displayed in view mode (in the pane specified by -t or the current pane if omitted) after the command finishes. If the command fails, the exit status is also displayed.
wait-for [-L | -S | -U] channel (alias: wait) When used without options, prevents the client from exiting until woken using wait-for -S with the same channel.  When -L is used, the channel is locked and any clients that try to lock the same channel are made to wait until the channel is unlocked with wait-for -U.
When a tmux client detaches, it prints a message.  This may be one of:
detached (from session ...) The client was detached normally.
detached and SIGHUP The client was detached and its parent sent the SIGHUP signal (for example with detach-client -P).
lost tty The client's tty(4) or pty(4) was unexpectedly destroyed.
terminated The client was killed with SIGTERM.
too far behind The client is in control mode and became unable to keep up with the data from tmux.
exited  The server exited when it had no sessions.
server exited The server exited when it received SIGTERM.
server exited unexpectedly The server crashed or otherwise exited without telling the client the reason.
tmux understands some unofficial extensions to terminfo(5).  It is not normally necessary to set these manually, instead the terminal-features option should be used.
AX      An existing extension that tells tmux the terminal supports default colours.
Bidi    Tell tmux that the terminal supports the VTE bidirectional text extensions.
Cs, Cr  Set the cursor colour.  The first takes a single string argument and is used to set the colour; the second takes no arguments and restores the default cursor colour.  If set, a sequence such as this may be used to change the cursor colour from inside tmux:
$ printf '\033]12;red\033\\'
Cmg, Clmg, Dsmg, Enmg Set, clear, disable or enable DECSLRM margins.  These are set automatically if the terminal reports it is VT420 compatible.
Dsbp, Enbp Disable and enable bracketed paste.  These are set automatically if the XT capability is present.
Dseks, Eneks Disable and enable extended keys.
Dsfcs, Enfcs Disable and enable focus reporting.  These are set automatically if the XT capability is present.
Rect    Tell tmux that the terminal supports rectangle operations.
Smol    Enable the overline attribute.
Smulx   Set a styled underscore.  The single parameter is one of: 0 for no underscore, 1 for normal underscore, 2 for double underscore, 3 for curly underscore, 4 for dotted underscore and 5 for dashed underscore.
Setulc, ol Set the underscore colour or reset to the default.  The argument is (red * 65536) + (green * 256) + blue where each is between 0 and 255.
Ss, Se  Set or reset the cursor style.  If set, a sequence such as this may be used to change the cursor to an underline:
$ printf '\033[4 q'
If Se is not set, Ss with argument 0 will be used to reset the cursor style instead.
Sync    Start (parameter is 1) or end (parameter is 2) a synchronized update.
Tc      Indicate that the terminal supports the ‘direct colour’ RGB escape sequence (for example, \e[38;2;255;255;255m).
If supported, this is used for the initialize colour escape sequence (which may be enabled by adding the ‘initc’ and ‘ccc’ capabilities to the tmux terminfo(5) entry).
This is equivalent to the RGB terminfo(5) capability.
Ms      Store the current buffer in the host terminal's selection (clipboard).  See the set-clipboard option above and the xterm(1) man page.
XT      This is an existing extension capability that tmux uses to mean that the terminal supports the xterm(1) title set sequences and to automatically set some of the capabilities above.
tmux offers a textual interface called control mode.  This allows applications to communicate with tmux using a simple text-only protocol.
In control mode, a client sends tmux commands or command sequences terminated by newlines on standard input.  Each command will produce one block of output on standard output.  An output block consists of a %begin line followed by the output (which may be empty).  The output block ends with a %end or %error.  %begin and matching %end or %error have three arguments: an integer time (as seconds from epoch), command number and flags (currently not used).  For example:
%begin 1363006971 2 1 0: ksh* (1 panes) [80x24] [layout b25f,80x24,0,0,2] @2 (active) %end 1363006971 2 1
The refresh-client -C command may be used to set the size of a client in control mode.
In control mode, tmux outputs notifications.  A notification will never occur inside an output block.
The following notifications are defined:
%client-detached client The client has detached.
%client-session-changed client session-id name The client is now attached to the session with ID session-id, which is named name.
%continue pane-id The pane has been continued after being paused (if the pause-after flag is set, see refresh-client -A).
%exit [reason] The tmux client is exiting immediately, either because it is not attached to any session or an error occurred.  If present, reason describes why the client exited.
%extended-output pane-id age ... : value New form of %output sent when the pause-after flag is set.  age is the time in milliseconds for which tmux had buffered the output before it was sent.  Any subsequent arguments up until a single ‘:’ are for future use and should be ignored.
%layout-change window-id window-layout window-visible-layout window-flags The layout of a window with ID window-id changed.  The new layout is window-layout.  The window's visible layout is window-visible-layout and the window flags are window-flags.
%output pane-id value A window pane produced output.  value escapes non-printable characters and backslash as octal \xxx.
%pane-mode-changed pane-id The pane with ID pane-id has changed mode.
%pause pane-id The pane has been paused (if the pause-after flag is set).
%session-changed session-id name The client is now attached to the session with ID session-id, which is named name.
%session-renamed name The current session was renamed to name.
%session-window-changed session-id window-id The session with ID session-id changed its active window to the window with ID window-id.
%sessions-changed A session was created or destroyed.
%subscription-changed name session-id window-id window-index pane-id ... : value The value of the format associated with subscription name has changed to value.  See refresh-client -B.  Any arguments after pane-id up until a single ‘:’ are for future use and should be ignored.
%unlinked-window-add window-id The window with ID window-id was created but is not linked to the current session.
%window-add window-id The window with ID window-id was linked to the current session.
%window-close window-id The window with ID window-id closed.
%window-pane-changed window-id pane-id The active pane in the window with ID window-id changed to the pane with ID pane-id.
%window-renamed window-id name The window with ID window-id was renamed to name.
When tmux is started, it inspects the following environment variables:
EDITOR    If the command specified in this variable contains the string ‘vi’ and VISUAL is unset, use vi-style key bindings.  Overridden by the mode-keys and status-keys options.
HOME      The user's login directory.  If unset, the passwd(5) database is consulted.
LC_CTYPE  The character encoding locale(1).  It is used for two separate purposes.  For output to the terminal, UTF-8 is used if the -u option is given or if LC_CTYPE contains "UTF-8" or "UTF8". Otherwise, only ASCII characters are written and non-ASCII characters are replaced with underscores (‘_’).  For input, tmux always runs with a UTF-8 locale.  If en_US.UTF-8 is provided by the operating system it is used and LC_CTYPE is ignored for input.  Otherwise, LC_CTYPE tells tmux what the UTF-8 locale is called on the current system.  If the locale specified by LC_CTYPE is not available or is not a UTF-8 locale, tmux exits with an error message.
LC_TIME   The date and time format locale(1).  It is used for locale- dependent strftime(3) format specifiers.
PWD       The current working directory to be set in the global environment.  This may be useful if it contains symbolic links. If the value of the variable does not match the current working directory, the variable is ignored and the result of getcwd(3) is used instead.
SHELL     The absolute path to the default shell for new windows.  See the default-shell option for details.
TMUX_TMPDIR The parent directory of the directory containing the server sockets.  See the -L option for details.
VISUAL    If the command specified in this variable contains the string ‘vi’, use vi-style key bindings.  Overridden by the mode-keys and status-keys options.
~/.tmux.conf       Default tmux configuration file. /etc/tmux.conf     System-wide configuration file.
To create a new tmux session running vi(1):
$ tmux new-session vi
Most commands have a shorter form, known as an alias.  For new-session, this is new:
$ tmux new vi
Alternatively, the shortest unambiguous form of a command is accepted.  If there are several options, they are listed:
$ tmux n ambiguous command: n, could be: new-session, new-window, next-window
Within an active session, a new window may be created by typing ‘C-b c’ (Ctrl followed by the ‘b’ key followed by the ‘c’ key).
Windows may be navigated with: ‘C-b 0’ (to select window 0), ‘C-b 1’ (to select window 1), and so on; ‘C-b n’ to select the next window; and ‘C-b p’ to select the previous window.
A session may be detached using ‘C-b d’ (or by an external event such as ssh(1) disconnection) and reattached with:
$ tmux attach-session
Typing ‘C-b ?’ lists the current key bindings in the current window; up and down may be used to navigate the list or ‘q’ to exit from it.
Commands to be run when the tmux server is started may be placed in the ~/.tmux.conf configuration file.  Common examples include:
Changing the default prefix key:
set-option -g prefix C-a unbind-key C-b bind-key C-a send-prefix
Turning the status line off, or changing its colour:
set-option -g status off set-option -g status-style bg=blue
Setting other options, such as the default command, or locking after 30 minutes of inactivity:
set-option -g default-command "exec /bin/ksh" set-option -g lock-after-time 1800
Creating new key bindings:
bind-key b set-option status bind-key / command-prompt "split-window 'exec man %%'" bind-key S command-prompt "new-window -n %1 'ssh %1'"
pty(4)
Nicholas Marriott <nicholas.marriott@gmail.com>
wodim(1)                                                                wodim(1)
wodim - write data to optical disk media
wodim [options] track1...trackn
There may be similarities and differences between this program and other disk recording application(s). See the CREDITS and AUTHORS sections below to learn about the origin of wodim.
wodim is used to record data or audio Compact Discs on an Orange Book CD- Recorder or to write DVD media on a DVD-Recorder.
The device is the device file or label offered by the operating system to access the recorder with SCSI GENERIC (sg) interface. Note that some operating systems may provide separate device nodes for block-oriented and sg access. For example, on older Linux systems, the sg access was available through /dev/sg...  files while the block oriented access was done through associated (but not identical) /dev/hd...  and /dev/sr... (or /dev/scd...  ) files.
In any case, the user running wodim needs read and write access to the particular device file on a Linux system. It is recommended to be root or install the application as suid-root, because certain versions of Linux (kernel) limit the set of SCSI commands allowed for non-root users. Even if usage without root identity is possible in many cases, some device drivers still may fail, show unexplainable problems and generally the problems become harder to debug. The risk for buffer-underruns is also increased. See the PROCESS SCHEDULING PRIORITY section below for more details.
There is an alternative way of specifying the device, using the traditional SCSI descriptions in form of devicetype:bus/target/lun specification. However, the success of this method is not guaranteed since it requires an adaptation scheme for your architecture, and the numbers may vary depending on the hardware-internal numbering or on the order of hot-plug device detection. If your operating system does not provide a sufficient framework for keeping this numbers persistent, don't rely on them. See -scanbus and --devices options below for details.
There are emulated SCSI compatible device systems, using the SCSI protocols transported over various hardware/media types. The most known examples is ATAPI ("IDE burners") or USB storage ("external USB case"). If the pseudo-SCSI b/t/l device address specification is used instead of the native one, you need to prepend the "devicetype:" description to the emulated "bus/target/lun" device address.
If a file /etc/wodim.conf exists, the parameter to the dev= option may also be a drive name label in that file (see FILES section).
As a special exception, the device specification can be -1 or just omitted, which invokes automatic guessing of an appropriate device for the selected operation. However, this guessing is not available everywhere and is not reliable; it is only available for the user's convenience in simple environments.
In Track At Once mode, each track corresponds to a single file that contains the prepared data for that track.  If the argument is `-', standard input is used for that track.  Only one track may be taken from stdin.  In the other write modes, the direct file to track relation may not be implemented.  In -clone mode, a single file contains all data for the whole disk.  To allow DVD writing on platforms that do not implement large file support, wodim concatenates all file arguments to a single track when writing to DVD media.
Wodim tries to get higher process priority using different methods. This is important because the burn process is usually a realtime task, no long delays should occur while transmitting fresh data to the recorder. This is especially important on systems with insufficient RAM where swapping can create delays of many seconds.
A possible workaround on underpowered systems is the use of the burnfree or similar feature, allowing the recorder to resume.
Root permissions are usually required to get higher process scheduling priority.
On SVr4 compliant systems, wodim uses the real time class to get the highest scheduling priority that is possible (higher than all kernel processes).  On systems with POSIX real time scheduling wodim uses real time scheduling too, but may not be able to gain a priority that is higher than all kernel processes.
In order to be able to use the SCSI transport subsystem of the OS, run at highest priority and lock itself into core wodim either needs to be run as root, needs to be installed suid root or must be called via RBACs pfexec mechanism.
General options must be before any track file name or track option.
-v     Increment the level of general verbosity by one.  This is used e.g. to display the progress of the writing process.
-V     Increment the verbose level in respect of SCSI command transport by one.  This helps to debug problems during the writing process, that occur in the CD/DVD-Recorder.  If you get incomprehensible error messages you should use this flag to get more detailed output.  -VV will show data buffer content in addition.  Using -V or -VV slows down the process and may be the reason for a buffer underrun.
debug=#, -d Set the misc debug value to # (with debug=#) or increment the misc debug level by one (with -d). If you specify -dd, this equals to debug=2.  This may help to find problems while opening a driver for libusal as well as with sector sizes and sector types.  Using -debug slows down the process and may be the reason for a buffer underrun.
kdebug=#, kd=# Tell the usal-driver to modify the kernel debug value while SCSI commands are running.
-silent, -s Do not print out a status report for failed SCSI commands.
-force Force to continue on some errors. Be careful when using this option.  wodim implements several checks that prevent you from doing unwanted things like damaging CD-RW media by improper drives. Many of the sanity checks are disabled when the -force option is used.
This option also implements some tricks that will allow you to blank bad CD-RW disks.
-immed Tell wodim to set the SCSI IMMED flag in certain commands (load/eject/blank/close_track/close_session).  This can be useful on broken systems with ATAPI harddisk and CD/DVD writer on the same bus or with SCSI systems that don't use disconnect/reconnect. These systems will freeze while blanking or fixating a CD/DVD or while a DVD writer is filling up a session to the minimum amount (approx. 800 MB).  Setting the -immed flag will request the command to return immediately while the operation proceeds in background, making the bus usable for the other devices and avoiding the system freeze.  This is an experimental feature which may work or not, depending on the model of the CD/DVD writer.  A correct solution would be to set up a correct cabling but there seem to be notebooks around that have been set up the wrong way by the manufacturer.  As it is impossible to fix this problem in notebooks, the -immed option has been added.
A second experimental feature of the -immed flag is to tell wodim to try to wait short times while writing to the media. This is expected to free the IDE bus if the CD/DVD writer and the data source are connected to the same IDE cable. In this case, the CD/DVD writer would otherwise usually block the IDE bus for nearly all the time making it impossible to fetch data from the source drive. See also minbuf= and -v option.
Use both features at your own risk.  If it turns out that it would make sense to have a separate option for the wait feature, write to the author and convince him.
minbuf=value The # minbuf= option allows to define the minimum drive buffer fill ratio for the experimental ATAPI wait mode that is intended to free the IDE bus to allow hard disk and CD/DVD writer to be on the same IDE cable.  As the wait mode currently only works when the verbose option -v has been specified, wodim implies the verbose option in case the -immed or minbuf= option have been specified.  Valid values for minbuf= are between 25 and 95 for 25%...95% minimum drive buffer fill ratio.
-dummy The CD/DVD-Recorder will go through all steps of the recording process, but the laser is turned off during this procedure.  It is recommended to run several tests before actually writing to a Compact Disk or Digital Versatile Disk, if the timing and load response of the system is not known.
-clone Tells wodim to handle images created by readom -clone.  The -clone may only be used in conjunction with with the -raw96r or with the -raw16 option.  Using -clone together with -raw96r is preferred as it allows to write all subchannel data.  The option -raw16 should only be used with drives that do not support to write in -raw96r mode.
-dao
-sao   Set SAO (Session At Once) mode which is usually called Disk At Once mode.  This currently only works with MMC drives that support Session At Once mode.  Note that wodim needs to know the size of each track in advance for this mode (see the genisoimage -print- size option and the EXAMPLES section for more information).
-tao   Set TAO (Track At Once) writing mode.  This is the default write mode in previous wodim versions.  With most drives, this write mode is required for multi session recording.
-raw   Set RAW writing mode.  Using this option defaults to -raw96r. Note that wodim needs to know the size of each track in advance for this mode (see the genisoimage -print-size option and the EXAMPLES section for more information).
-raw96r Select Set RAW writing mode with 2352 byte sectors plus 96 bytes of raw P-W subchannel data resulting in a sector size of 2448 bytes.  This is the preferred raw writing mode as it gives best control over the CD writing process.  If you find any problems with the layout of a disk or with sub channel content (e.g. wrong times on the display when playing the CD) and your drive supports to write in -raw96r or -raw16 mode, you should give it a try. There are several CD writers with bad firmware that result in broken disks when writing in TAO or SAO mode.  Writing data disks in raw mode needs significantly more CPU time than other write modes. If your CPU is too slow, this may result in buffer underruns.  Note that wodim needs to know the size of each track in advance for this mode (see the genisoimage -print-size option and the EXAMPLES section for more information).