Previous: Python tips, Up: Tips and solutions [Contents]
Some notes on how sessions and windows are named and identified.
The session name is an optional user-specified name for a terminal session.
It is recommended that this be unique, but that is not enforced.
The session name can be specified with the -session-name
(or --sn
) option in the domterm new
command.
You can also dynamically change the session name with an escape sequence:
echo -en "\e]30;session-name\007"
It is recommended (but not required) that a session name have the format of an “identifier”: The first character should be a letter, and the rest should be letters, digits, hyphen, or underscore.
The session number is a positive integer associated with a terminal session. It is unique within a domterm server.
The domterm attach
command requires a session specifier,
which can be any one of:
Each DomTerm instance in a browser has a corresponding
<div>
element which has domterm
in its
class
attribute.
The <div class="domterm">
element also has the following
identifying attributes, which can be used for session-specific styling:
session-number=
session-number
pid=
pid
session-name=
session-name
(but only if the session-name has been set).
The window name is a short name displayed for each terminal in the window title or tab. It is constructed from up to 3 parts:
DomTerm
if the session name is not specified.
The window and icon titles are strings sent by the application.
The escape sequences are those of xterm.
They are commonly sent by shells (for example using bash’s
PROMPT_COMMAND
) and may include the current directory and maybe
other information.
Most terminal emulators include the window title string
in the window title bar.
When tabs are used, DomTerm displays the window name in each tab. For active tabs, DomTerm displays both the window name (normally the session name) and the window title (typically the current directory). This information may be shown in the main window title bar as well as the currently active tab.
Previous: Python tips, Up: Tips and solutions [Contents]