next up previous contents index
Next: The Tool Control Window Up: The WRspice User Interface Previous: WRspice Environment Variables   Contents   Index


Initialization Files

WRspice will attempt to source startup files used for initialization when the program is started. First, a file named ``wrspiceinit'' is searched for in the system startup directory, and if found is sourced into WRspice. The system startup directory has a default location built into the program
(/usr/local/lib/xictools/wrspice/startup, or if XT_PREFIX is set in the environment, its value replaces ``/usr/local''), but this can be changed by setting the SPICE_LIB_DIR environment variable to another location.

A file named ``.wrspiceinit'' is searched for in the current directory, and the user's home directory. The first instance found is sourced. If running on Microsoft Windows which does not support the notion of a home directory, WRspice will look in the environment for a variable named ``HOME'', and its value will be taken as the path to the "home directory". If not set, the search is skipped.

These files have identical format, and contain ordinary script commands, which can be used to set the default behavior of WRspice. The first line is ignored, but all remaining lines are taken as script commands. The special directive tbsetup, which can only appear in these files, provides the setup information for the graphical interface. Unlike ordinary input files, it is not necessary to enclose the commands in .control or .exec blocks in the startup files.

When using the X-window system, the X resource-passing mechanism can be used to set the default colors used in plots. The resource mechanism is otherwise ignored in the current version of WRspice. The base names for the color resources are ``color0'' through ``color19'', with the corresponding class names capitalized. Thus, one way to define alternative plotting colors is to create a file named ``Wrspice'' in the user's home directory, which contains lines like

*color2: red
for each new color definition. The color name should be known to the X window system, i.e., be listed in the rgb.txt file in the X-windows system library.

The same definitions could be placed in a .wrspiceinit file with lines like ``set color2 = red''.


next up previous contents index
Next: The Tool Control Window Up: The WRspice User Interface Previous: WRspice Environment Variables   Contents   Index
Stephen R. Whiteley 2006-10-23