From 4801fff08bf3d42361a72e339c59390828983f49 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Tue, 27 Sep 2022 14:34:03 +0100 Subject: Add --include option. This allows config files to include other files, so you can e.g. split style and behaviour options into different files. --- doc/config | 7 +++++++ doc/tofi.5.md | 10 ++++++++++ doc/tofi.5.scd | 8 ++++++++ 3 files changed, 25 insertions(+) (limited to 'doc') diff --git a/doc/config b/doc/config index e1e93a7..f95a367 100644 --- a/doc/config +++ b/doc/config @@ -144,3 +144,10 @@ # for a short time after launch. The only reason to use this option is # performance on slow systems. late-keyboard-init = false + +# +### Inclusion +# + # Configs can be split between multiple files, and then included + # within each other. + # include = /path/to/config diff --git a/doc/tofi.5.md b/doc/tofi.5.md index 8455667..b330278 100644 --- a/doc/tofi.5.md +++ b/doc/tofi.5.md @@ -20,6 +20,16 @@ case-insensitive, except where not possible (e.g. paths). Later options override earlier options, and command line options override config file options. +# SPECIAL OPTIONS + +**include**=*path* + +> Include the contents of another config file. If *path* is a relative +> path, it is interpreted as relative to this config file's path (or the +> current directory if **--include** is passed on the command line). +> Inclusion happens immediately, before the rest of the current file's +> contents are parsed. + # BEHAVIOUR OPTIONS **hide-cursor**=*true\|false* diff --git a/doc/tofi.5.scd b/doc/tofi.5.scd index 696b06e..e0faa2d 100644 --- a/doc/tofi.5.scd +++ b/doc/tofi.5.scd @@ -22,6 +22,14 @@ case-insensitive, except where not possible (e.g. paths). Later options override earlier options, and command line options override config file options. +# SPECIAL OPTIONS + +*include*=_path_ + Include the contents of another config file. If _path_ is a relative path, + it is interpreted as relative to this config file's path (or the current + directory if *--include* is passed on the command line). Inclusion happens + immediately, before the rest of the current file's contents are parsed. + # BEHAVIOUR OPTIONS *hide-cursor*=_true|false_ -- cgit v1.2.3