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:
First TrEd looks for a file given with a command-line parameter -c (see Section 8 for details).
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.
If the TREDHOME system variable is set TrEd searches for tredrc file in that directory.
TrEd looks for a tredrc file in the directory where the program file of TrEd itself is located.
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.
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:
Use File->Reload Config menu command to make TrEd re-read the configuration file from disk.
In the TrEd's internal configuration editor use the Save and Apply button to apply changes and save them or Apply button to apply changes withought saving them. The first command aslo quits the configuration editor.
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:
Background color of the tree-view canvas.
Background image file (JPG/GIF). Tiles are not supported.
Color of the frame drawn around the focused view.
Color to draw the active node. Default is red.
Color to highlight the nearest node to indicate the destination of a possible drop when dragging a node.
Color used to display text of normal tree attributes.
Color used to display text of shadowed tree attributes.
Color used to display text of highlighted tree attributes.
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.
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.
Color used to flash the text of an attribute under the mouse-pointer.
Background color of a border drawn around the text of attributes if the View->Draw Boxes item is checked.
Background color of a border drawn around the text of the active node's attributes if the View->Draw Boxes item is checked.
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.
Color used to draw the lines connecting dependent nodes in a tree. Default is black.
Color used to draw the lines connecting hidden nodes with their parents. Default is gray.
Controls is lines connecting hidden nodes with their parents are dashed or solid. Allowed values are 0 (solid) or 1 (dashed). Default is 0.
Color used to fill an ordinary node of the tree. Default is yellow.
Color used to draw the outline of an ordinary node. Default is black.
Color used to draw nodes marked as hidden, if shown. Default is black.