Next: , Previous: , Up: Configuration   [Contents][Index]


3.3 Overview of the new configuration system

Configuration parameters are always evaluated within a configuration context which defines what configuration files are processed and the processing order. Each context is associated with a configuration file (although the file does not necessarily need to exist).

There are five configuration contexts:

DEFAULT
SYSTEM
USER
PATH
CACHE

Context inheritance means that if particular configuration parameter is not found in some context, the value from its parent context is used instead. And if parameter is set in the child context it will override one set in the parent context(s).

Configuration file contains ‘groups’ and ‘key=value’ pairs, for example:

[group]
key=value

Lines beginning with a ‘#’ and blank lines are considered comments:

# This is a comment

lepton-cli utility with the config command is used to read and write configuration settings:

lepton-cli config [option] [group key [value]]

option can be either --system, --user, --project[=path], or --cache to access the ‘SYSTEM’, ‘USER’, ‘PATH’, or ‘CACHE’ context, respectively.

For example, to get value of the font key from the schematic.gui group in the ‘USER’ configuration context, issue the following command, which will print the result to standard output:

lepton-cli config --user "schematic.gui" "font"
-| OpenGost Type B TT Regular

To set that value to ‘Monospace Regular’ for configuration in the current directory, type:

lepton-cli config --project "schematic.gui" "font" "Monospace Regular"

Next: , Previous: , Up: Configuration   [Contents][Index]