7. Configuring and customizing TrEd

The configuration and customizing of TrEd is possible through the configuration file. When started TrEd tries to search for its configuration file on several places and uses the first configuraton file found:

  1. First TrEd looks for a file given with a command-line parameter -c (see Section 8 for details).

  2. If the HOME system variable is set (on UNIX/Linux this variable points to user's home directory) TrEd searches for .tredrc (mind the dot here) file in that directory.

  3. If the TREDHOME system variable is set TrEd searches for tredrc file in that directory.

  4. TrEd looks for a tredrc file in the directory where the program file of TrEd itself is located.

  5. TrEd looks for a tredrc file in directories ../lib/tred, ../lib/tredlib and ./tredlib/tredrc respectively, relatvely to the directory where the program file of TrEd itself is located.

  6. TrEd looks for a tredrc file in the /usr/share/config/ directory.

If none of these files is found, default values for configuration options are used.

TrEd's configuration file is a plain text file with a very simple structure. It can be edited not only in any editor (like vi, Emacs or Notepad) and also directly from TrEd when the File->Edit Config menu command is issued. In both cases there is a way to update the options used by a running session of TrEd:

Note

Some configuration options even if applyed take effect only after restarting TrEd.

The format of the configuration file is of this simple form:

option_name = value

There may be any amount of white-space between the option name and value but they must be both on the same line. Any characters folowing a semi-colon (;) to the end of line are considered as comment and are ignored. You may also need to quote the value using either double-quotes ("value") or simple quotes ('value') to preserve white-space or semi-colons. The option names are case-insensitive.

The available configuration options may be divided into several categories:

7.1. Colors

BackgroundColor

Background color of the tree-view canvas.

BackgroundImage

Background image file (JPG/GIF). Tiles are not supported.

HighlightWindowColor

Color of the frame drawn around the focused view.

CurrentNodeColor

Color to draw the active node. Default is red.

NearestNodeColor

Color to highlight the nearest node to indicate the destination of a possible drop when dragging a node.

TextColor

Color used to display text of normal tree attributes.

TextColorShadow

Color used to display text of shadowed tree attributes.

TextColorHilite

Color used to display text of highlighted tree attributes.

TextColorXHilite

Color used to display text of extra-highlighted tree attributes. See FS-format description to learn about how to specify which attributes are shadowed, highlighted and extra-highlighted.

CustomColorn

Here n stands for any number between 0..9. These options define ten custom colors which may be symbolically refered to and used in the attribute patterns. To refer to the n'th custom color use the sequence #{customn} in the pattern. For more information see Section 5. See also the AllowCustomColors option which can be used to enable or disable the actual use of the custom colors.

ActiveTextColor

Color used to flash the text of an attribute under the mouse-pointer.

BoxColor

Background color of a border drawn around the text of attributes if the View->Draw Boxes item is checked.

CurrentBoxColor

Background color of a border drawn around the text of the active node's attributes if the View->Draw Boxes item is checked.

HiddenBoxColor

Background color of a border drawn around the text of a hidden node's attributes if the View->Draw Boxes and View->Show Hidden items are checked.

LineColor

Color used to draw the lines connecting dependent nodes in a tree. Default is black.

HiddenLineColor

Color used to draw the lines connecting hidden nodes with their parents. Default is gray.

dashHiddenLines

Controls is lines connecting hidden nodes with their parents are dashed or solid. Allowed values are 0 (solid) or 1 (dashed). Default is 0.

NodeColor

Color used to fill an ordinary node of the tree. Default is yellow.

NodeOutlineColor

Color used to draw the outline of an ordinary node. Default is black.

HiddenNodeColor

Color used to draw nodes marked as hidden, if shown. Default is black.