forked from external/yambar
module/xkb: export module info through the new module_info struct type
This commit is contained in:
parent
87640339e1
commit
905f289659
4 changed files with 25 additions and 20 deletions
12
config.c
12
config.c
|
@ -369,14 +369,6 @@ module_xwindow_from_config(const struct yml_node *node, const struct font *paren
|
|||
return module_xwindow(conf_to_particle(c, parent_font));
|
||||
}
|
||||
|
||||
static struct module *
|
||||
module_xkb_from_config(const struct yml_node *node,
|
||||
const struct font *parent_font)
|
||||
{
|
||||
const struct yml_node *c = yml_get_value(node, "content");
|
||||
return module_xkb(conf_to_particle(c, parent_font));
|
||||
}
|
||||
|
||||
struct bar *
|
||||
conf_to_bar(const struct yml_node *bar)
|
||||
{
|
||||
|
@ -485,12 +477,12 @@ conf_to_bar(const struct yml_node *bar)
|
|||
mods[idx] = module_network.from_conf(m.value, font);
|
||||
else if (strcmp(mod_name, "removables") == 0)
|
||||
mods[idx] = module_removables.from_conf(m.value, font);
|
||||
else if (strcmp(mod_name, "xkb") == 0)
|
||||
mods[idx] = module_xkb.from_conf(m.value, font);
|
||||
|
||||
|
||||
else if (strcmp(mod_name, "xwindow") == 0)
|
||||
mods[idx] = module_xwindow_from_config(m.value, font);
|
||||
else if (strcmp(mod_name, "xkb") == 0)
|
||||
mods[idx] = module_xkb_from_config(m.value, font);
|
||||
else
|
||||
assert(false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue