ifdef::basebackend-manpage[]
:doctitle: domterm(1)

== Name
domterm - terminal emulator and multiplexer
endif::[]
ifndef::basebackend-manpage[]
== domterm - terminal emulator and multiplexer
endif::[]

== Synopsis

`domterm` [_options_] [_command_ _arguments_ ...]

== Description

DomTerm is a terminal emulator that supports embedded graphics and html;
builtin tiling and tabs; session management; and more.

The ``domterm`` command manages terminal sessions, and
creates windows (and sub-windows) to display them.
The display uses an embedded web browser (using electron
or QtWebEngine); you can also use a regular desktop browser.

If no arguments are specified, a new terminal window is created,
as if using the `new` command.

== Commands
You can get help for a specific _command_ with the `help` command.
For example: `domterm help new`.

=== Sessions
[horizontal]
`help` [_topic_]:: Help on given _topic_.
`new` [_command_ [_arguments_]]:: Create new termimal session and window
_command_ [_arguments_]:: Short-hand for `new`. 
`attach` _session_:: Attach to an existing session.
`list`:: List terminal sessions.
`status`:: List sessions, windows, versions.

=== Subcommands for output
[horizontal]
`html` [or `hcat`]:: display html
`image` [or `imgcat`]:: display image
`fresh-line`:: if not at beginning of line, starts a fresh line

=== Subcommands for styling

[horizontal]
`reverse-video` `on`|`off`:: switch between dark or light background
`add-style`:: add a new rule to a temporary stylesheet
`load-stylesheet`:: load new stylesheet from a file
`list-stylesheets`:: list loaded stylesheets
`print-stylesheet`:: print stylesheet rules from a loaded stylesheet
`disable-stylesheet`:: disable a stylesheet
`enable-stylesheet`:: enable a stylesheet

=== Miscellaneous subcommands
[horizontal]
`browse` _url_:: view html or image in new web browser (sub-)window
`is-domterm`:: succeeds if running under DomTerm
`view-saved` _file_:: view save-as-html file

== Options

The commands that create a new (sub-)window
(currently `new`, `attach`, `browse`, and `view-saved`) optionally
take a window-specifier option to describe how to create the new window.
See `help window-specifier` for details.

`--version`::
  Print version number and exit.

`--help`, `-h`:: Print help and exit. Same as `domterm help`.

`--geometry` __W__x__H__::
    Specify initial size of new top-level windows. The default if
    not specified is currently 800x600. The width and height are in
    pixel units and must be positive integers.

    Works for both the Electron and qtdomterm front-ends.
The size of the main window.

``--settings=``_filename_::
Specify the location of the settings file containing user preferences.
The default is `.domterm/settings.ini` in the user’s home directory,
except on WSL (Windows Subsystem for Linux),
where it is ``c:\Users\``_USER_``\AppData\Roaming\DomTerm\settings.ini``.
+
Note this flag won’t have much if any effect if you specify it when there
is already a running domterm server.

`--no-daemonize`::
`--daemonize`::
    When a domterm backend (server) is created, it normally turns itself
    into a disconnected server (a daemon). The option `--no-daemonize`
    option  prevents “daemonizing” - which is helpful for debugging.

``--socket-name=``_name_::
DomTerm uses a Unix Domain socket to communicate between the
command-line and the server. By default the socket is the file
$`HOME/.domain/default.socket,` but this option overrides
that. Using different socket names mean you get different servers
that do not know about each other. If _name_ starts with ‘/’
then the filename is absolute; otherwise `$HOME/.domain/` is
prepended. If there is no file extension, `.socket` is appended.
+
DomTerm also creates a temporary html that has the same name as
the socket, but with a `.html` extension. That is by default it
is `$HOME/.domain/default.html`.

== See also

qtdomterm(1)

https://domterm.org/ - the DomTerm home page
