4.2.3 Theme Selection

In order to select a theme, you can use the built-in option --clon-theme or its accompanying environment variable CLON_THEME. Just provide it with the theme name, and the corresponding theme file will be looked up in the search path (see Search Path), stopping at the first match.

You can omit the ‘cth’ extension: Clon looks for a file named exactly as you said first and attempts to add the theme extension next. Note that searching with or without extension has priority over the search path. For instance, suppose that the following files exist:

Using --clon-theme=foobar will match the first one while --clon-theme=foobar.cth will match the second.

Now suppose that the following files exist:

Using either --clon-theme=foobar or --clon-theme=foobar.cth will always match the first file. Which brings us to the next point (how clever).

It is possible to bypass the search path when looking for a theme: just provide --clon-theme with a theme name starting with a path component (i.e./’, ‘./’ or ‘../’). Even in that case, you can still omit the ‘cth’ extension.

Finally, here is an important precision about --clon-theme. This option has a fallback of nil and a default of raw. This means that if you don’t use the option at all, a theme named raw will be looked up in the search path. This theme exists in the standard distribution and you are free to modify it. On the other hand, since this option has a fallback, it means that its argument is optional. If you don’t provide any argument (that is, if you just use --clon-theme), then the built-in raw theme will be used. This theme is originally identical to the one provided in the file raw.cth but since it is built in every clonified application, you cannot change it.