mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
module/network: export module info through the new module_info struct type
This commit is contained in:
parent
a16e2f5a53
commit
697e613b2e
4 changed files with 30 additions and 26 deletions
15
config.c
15
config.c
|
@ -377,17 +377,6 @@ module_xkb_from_config(const struct yml_node *node,
|
|||
return module_xkb(conf_to_particle(c, parent_font));
|
||||
}
|
||||
|
||||
static struct module *
|
||||
module_network_from_config(const struct yml_node *node,
|
||||
const struct font *parent_font)
|
||||
{
|
||||
const struct yml_node *name = yml_get_value(node, "name");
|
||||
const struct yml_node *content = yml_get_value(node, "content");
|
||||
|
||||
return module_network(
|
||||
yml_value_as_string(name), conf_to_particle(content, parent_font));
|
||||
}
|
||||
|
||||
static struct module *
|
||||
module_removables_from_config(const struct yml_node *node,
|
||||
const struct font *parent_font)
|
||||
|
@ -510,14 +499,14 @@ conf_to_bar(const struct yml_node *bar)
|
|||
mods[idx] = module_label.from_conf(m.value, font);
|
||||
else if (strcmp(mod_name, "mpd") == 0)
|
||||
mods[idx] = module_mpd.from_conf(m.value, font);
|
||||
else if (strcmp(mod_name, "network") == 0)
|
||||
mods[idx] = module_network.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 if (strcmp(mod_name, "network") == 0)
|
||||
mods[idx] = module_network_from_config(m.value, font);
|
||||
else if (strcmp(mod_name, "removables") == 0)
|
||||
mods[idx] = module_removables_from_config(m.value, font);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue