How To Customize LC's Appearance And Behavior

LC's appearance can be customized by setting its X resources. This can be done in (more than) three ways:
  1. By creating a $HOME/Lc file containing the resources.
  2. By adding resources to your .Xdefaults or .Xresources file. These files are loaded in the X resource database by xrdb.
  3. By setting up a system-wide application default resources file. These usually go in /usr/lib/X11/app-defaults.

How To Get Started

One starting point for all of these activities is the list of fallback resources compiled into LC. These settings are used when no other resources have been specified.

You can download the fallback resources for LC 2.9, then modify the file to suit your needs. If you place this file in your home directory (or in the directory pointed to by the environment variable $XAPPLRESDIR), then any changes made to the configuration will be used the next time that you run LC.

Most X resources are used to control the appearance of LC. For example, you can change the number of items in a list. Some can control the behavior of the user interface. For example, you can set how a list should behave when a button press or draw is performed. These types of resources are widget resources. A list is a type of a widget, or user interface element. The names of the widget resources are the same for all X applications.

The other type of resources are application resources. These are defined specifically for LC. You can find out more about these resources by checking out the Application Resources section of the LC User's Guide.

You can find out more about X resources by reading the man pages for X (i.e., try typing "man X").

Caveats

It's possible to make LC behave in very strange ways if you're not careful when setting up its X resources. It's safer to set just a few resources via a .Xdefaults or .Xresources file rather than creating an application default resources file.

One pitfall is that each version of LC may require different resources. So you may not be able to use the configuration of an older version of LC with the latest release. This problem is reduced when you only set a few resources via a .Xdefaults or .Xresources file.

Resource Names

Resources are set by specifying a list of names to identify the resource. Sometimes a single specification may apply to many elements (say, the background color of all text fields), or to a single one. That's where resources get tricky (and powerful)! Two things to remember are that "." (a period) is used to separate names within a list, and "*" is a wildcard, so it can replace any unspecified part of a list. "!" at the beginning of a line is a comment in a resources file. Too bad there aren't more of them!

Most resources are given descriptive names, so you can pretty much tell what you're setting just by reading the name. Besides the names, there isn't much other documentation that can help you to set up your customized resources. By looking through the fallback resources for LC, you can decipher some of the meanings. If you're still confused, you can always ask the author how to get LC set up how you like. But remember, not everything is configurable! Some things about LC are set at the factory, and can't be changed by the user.


LC Home
Copyright © Cray Inc.
Maintained by Kevin Thomas (kjt@cray.com).
Last modified Tue Jun 27 08:57:23 CDT 2000