module/network: export module info through the new module_info struct type

This commit is contained in:
Daniel Eklöf 2019-01-12 12:56:54 +01:00
parent a16e2f5a53
commit 697e613b2e
4 changed files with 30 additions and 26 deletions

View file

@ -16,6 +16,7 @@
#include "modules/label/label.h"
#include "modules/label/label.h"
#include "modules/mpd/mpd.h"
#include "modules/network/network.h"
const char *
conf_err_prefix(const keychain_t *chain, const struct yml_node *node)
@ -437,12 +438,6 @@ verify_module(keychain_t *chain, const struct yml_node *node)
return false;
}
static const struct attr_info network[] = {
{"name", true, &conf_verify_string},
{"content", true, &conf_verify_particle},
{"anchors", false, NULL},
};
static const struct attr_info removables[] = {
{"spacing", false, &conf_verify_int},
{"left-spacing", false, &conf_verify_int},
@ -473,6 +468,7 @@ verify_module(keychain_t *chain, const struct yml_node *node)
{"i3", &module_i3},
{"label", &module_label},
{"mpd", &module_mpd},
{"network", &module_network},
};
static const struct {
@ -480,7 +476,6 @@ verify_module(keychain_t *chain, const struct yml_node *node)
const struct attr_info *attrs;
size_t count;
} modules[] = {
{"network", network, sizeof(network) / sizeof(network[0])},
{"removables", removables, sizeof(removables) / sizeof(removables[0])},
{"xkb", xkb, sizeof(xkb) / sizeof(xkb[0])},
{"xwindow", xwindow, sizeof(xwindow) / sizeof(xwindow[0])},