forked from external/yambar
module/clock: export module info through the new module_info struct type
This commit is contained in:
parent
e24923e7cc
commit
550d4ad534
4 changed files with 33 additions and 30 deletions
|
@ -11,6 +11,7 @@
|
|||
#include "modules/alsa/alsa.h"
|
||||
#include "modules/backlight/backlight.h"
|
||||
#include "modules/battery/battery.h"
|
||||
#include "modules/clock/clock.h"
|
||||
|
||||
static const char *
|
||||
err_prefix(const keychain_t *chain, const struct yml_node *node)
|
||||
|
@ -462,13 +463,6 @@ verify_module(keychain_t *chain, const struct yml_node *node)
|
|||
return false;
|
||||
}
|
||||
|
||||
static const struct attr_info clock[] = {
|
||||
{"date-format", false, &conf_verify_string},
|
||||
{"time-format", false, &conf_verify_string},
|
||||
{"content", true, &conf_verify_particle},
|
||||
{"anchors", false, NULL},
|
||||
};
|
||||
|
||||
static const struct attr_info label[] = {
|
||||
{"content", true, &conf_verify_particle},
|
||||
{"anchors", false, NULL},
|
||||
|
@ -521,6 +515,7 @@ verify_module(keychain_t *chain, const struct yml_node *node)
|
|||
{"alsa", &module_alsa},
|
||||
{"backlight", &module_backlight},
|
||||
{"battery", &module_battery},
|
||||
{"clock", &module_clock},
|
||||
};
|
||||
|
||||
static const struct {
|
||||
|
@ -528,7 +523,6 @@ verify_module(keychain_t *chain, const struct yml_node *node)
|
|||
const struct attr_info *attrs;
|
||||
size_t count;
|
||||
} modules[] = {
|
||||
{"clock", clock, sizeof(clock) / sizeof(clock[0])},
|
||||
{"i3", i3, sizeof(i3) / sizeof(i3[0])},
|
||||
{"label", label, sizeof(label) / sizeof(label[0])},
|
||||
{"mpd", mpd, sizeof(mpd) / sizeof(mpd[0])},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue