dtstyle - Changing styles

The dtstyle command is useful for managing and modifying the currently active stylesheets. It takes various options.

--add-rule style-rule

If called for the first time, create and install a temporary stylesheet. This temporary stylesheet has a name attribute with the value "(temporary-styles)". Add the style-rule to the temporary stylesheet.

For example, to change the background color to pink:

$ dtstyle --add-rule "div.domterm { background-color: pink }"

Inverse video:

$ dtstyle --add-rule "div.domterm { background-color: black; color: white }"

Setting a background image:

$ dtstyle --add-rule "div.domterm {background-image: url('file:/usr/share/backgrounds/gnome/Mirror.jpg')}"

Changing font size:

$ dtstyle --add-rule "body { font-size: 14pt }"
--load-stylesheet name filename

Replace or create a new stylesheet with the given name. The content of the stylesheet are read from the given filename. If the filename is - then standard input is used.

The name is used to set the non-standard name attribute of the created <style> element. If there is an existing stylesheet with a matching name attribute, then that stylesheet is replaced; otherwise a new stylesheet is created. The name attribute is displayed by the dtstyle --list command.


List on the standard output the set of stylesheets associated with the domterm document, one per line:

$ dtstyle --list
0: enabled  - "style/domterm-core.css"
1: enabled  - "style/domterm-standard.css"
2: enabled  "Default DomTerm styling" "style/domterm-default.css"
3: enabled  - "(temporary-styles)"

After the sequence number, either enabled or disabled specified whether the stylesheet is disabled. If the stylesheet has a title, if is shown next (in json format); otherwise - is printed. If the stylesheet has the href attribute, it is shown next (in json format); otherwise, if it has the code attribute, that is shown; otherwise - is printed.

--print index

Print out the style rules of the specified stylesheet, which is an index in the --list output.

--enable index
--disable index

Disable or enable the specified stylesheet. A index is an integer index into the list as shown by --list.

$ dtstyle --disable 2