-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interpret the "include" property as a directive to parse the configuration file described as the value. This mechanism is similar in behavior to the preprocessor #include directive. For this to work, the config parsing code changes its working directory to the directory containing the configuration file being included, and stores its path in a new "workdir" property, whenever a "command" property is being read. This allows the block code to change directory when a command is spawned, and thus allow command scripts relative to their included configuration fragment to work as expected. Note that include loop is detected, in which case an error is thrown. If the include path starts with "~/", tilde is replaced with the value of the HOME environment variable, if defined. Below is an example of config file using the "include" directive: # ~/.config/i3blocks/config separator=true separator_block_width=15 include=contrib/greetings/config # ~/.config/i3blocks/contrib/greetings/config [greetings] command=echo "Hello, $USER!" interval=once Refs #453
- Loading branch information
Showing
1 changed file
with
124 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters