config: add ‘include’ directive

This allows you to include sub-configurations. For example, theme
files.

The ‘include’ directive is a top-level keyword. I.e. it cannot be used
inside sections.

* The included file must be specified with an absolute path
* The included file is parsed in its own scope
* Nested includes are allowed
* Multiple include directives are allowed

Closes #555
This commit is contained in:
Daniel Eklöf 2021-05-28 17:44:13 +02:00
parent 8262c1f0c2
commit 9055d3d921
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 67 additions and 19 deletions

View file

@ -64,6 +64,22 @@ in this order:
Default: _monospace:size=8_ (*font*), _not set_ (*font-bold*,
*font-italic*, *font-bold-italic*).
*include*
Absolute path to configuration file to import.
The import file has its own section scope. I.e. the including
configuration is still in the default section after the include,
regardless of which section the included file ends in.
The path must be an absolute path.
Multiple include directives are allowed, but only one path per
directive.
Nested imports are allowed.
Default: _not set_.
*line-height*
An absolute value, in _points_, that override line height from the
font metrics.