config: allow font/foreground attributes on modules too

Previously we allowed it on the bar, and on all particles. Now we also
allow it on all modules.

This allows us to specify a "default" font/foreground on a per-module
basis, having it applied to all the modules particles.
This commit is contained in:
Daniel Eklöf 2019-01-13 14:24:44 +01:00
parent 8dc278aaf2
commit a425378576
13 changed files with 47 additions and 14 deletions

View file

@ -15,6 +15,11 @@ struct module_info {
bool (*verify_conf)(keychain_t *chain, const struct yml_node *node);
struct module *(*from_conf)(const struct yml_node *node,
struct conf_inherit inherited);
#define MODULE_COMMON_ATTRS \
{"font", false, &conf_verify_font}, \
{"foreground", false, &conf_verify_color}, \
{NULL, false, NULL}
};
struct module_run_context {