summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-09-27 14:34:03 +0100
committerPhil Jones <philj56@gmail.com>2022-09-27 14:34:03 +0100
commit4801fff08bf3d42361a72e339c59390828983f49 (patch)
treefc23e1fa0a954181159ce1ad8bf17546259e56f1 /doc
parent452c1b6fa737661358cd2d6ce47d1a6400039f53 (diff)
Add --include option.
This allows config files to include other files, so you can e.g. split style and behaviour options into different files.
Diffstat (limited to 'doc')
-rw-r--r--doc/config7
-rw-r--r--doc/tofi.5.md10
-rw-r--r--doc/tofi.5.scd8
3 files changed, 25 insertions, 0 deletions
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_