diff --git a/module.h b/module.h index ee2b114..b757a04 100644 --- a/module.h +++ b/module.h @@ -34,6 +34,8 @@ struct exposable *module_begin_expose(struct module *mod); /* List of attributes *all* modules implement */ #define MODULE_COMMON_ATTRS \ + {"content", true, &conf_verify_particle}, \ + {"anchors", false, NULL}, \ {"font", false, &conf_verify_font}, \ {"foreground", false, &conf_verify_color}, \ {NULL, false, NULL} diff --git a/modules/alsa.c b/modules/alsa.c index b9fedfe..57c87b2 100644 --- a/modules/alsa.c +++ b/modules/alsa.c @@ -302,8 +302,6 @@ verify_conf(keychain_t *chain, const struct yml_node *node) static const struct attr_info attrs[] = { {"card", true, &conf_verify_string}, {"mixer", true, &conf_verify_string}, - {"content", true, &conf_verify_particle}, - {"anchors", false, NULL}, MODULE_COMMON_ATTRS, }; diff --git a/modules/backlight.c b/modules/backlight.c index 98142f6..1c65d38 100644 --- a/modules/backlight.c +++ b/modules/backlight.c @@ -233,8 +233,6 @@ verify_conf(keychain_t *chain, const struct yml_node *node) { static const struct attr_info attrs[] = { {"name", true, &conf_verify_string}, - {"content", true, &conf_verify_particle}, - {"anchors", false, NULL}, MODULE_COMMON_ATTRS, }; diff --git a/modules/battery.c b/modules/battery.c index 246cc61..121d616 100644 --- a/modules/battery.c +++ b/modules/battery.c @@ -360,8 +360,6 @@ verify_conf(keychain_t *chain, const struct yml_node *node) static const struct attr_info attrs[] = { {"name", true, &conf_verify_string}, {"poll-interval", false, &conf_verify_int}, - {"content", true, &conf_verify_particle}, - {"anchors", false, NULL}, MODULE_COMMON_ATTRS, }; diff --git a/modules/clock.c b/modules/clock.c index fb28633..0599e9a 100644 --- a/modules/clock.c +++ b/modules/clock.c @@ -114,8 +114,6 @@ verify_conf(keychain_t *chain, const struct yml_node *node) static const struct attr_info attrs[] = { {"date-format", false, &conf_verify_string}, {"time-format", false, &conf_verify_string}, - {"content", true, &conf_verify_particle}, - {"anchors", false, NULL}, MODULE_COMMON_ATTRS, }; diff --git a/modules/i3.c b/modules/i3.c index df642b9..6f4299e 100644 --- a/modules/i3.c +++ b/modules/i3.c @@ -651,7 +651,7 @@ verify_conf(keychain_t *chain, const struct yml_node *node) {"right-spacing", false, &conf_verify_int}, {"content", true, &verify_content}, {"anchors", false, NULL}, - MODULE_COMMON_ATTRS, + {NULL, false, NULL}, }; return conf_verify_dict(chain, node, attrs); diff --git a/modules/label.c b/modules/label.c index 099d22f..a29b6bd 100644 --- a/modules/label.c +++ b/modules/label.c @@ -59,8 +59,6 @@ static bool verify_conf(keychain_t *chain, const struct yml_node *node) { static const struct attr_info attrs[] = { - {"content", true, &conf_verify_particle}, - {"anchors", false, NULL}, MODULE_COMMON_ATTRS, }; diff --git a/modules/mpd.c b/modules/mpd.c index 0b56b12..71757bf 100644 --- a/modules/mpd.c +++ b/modules/mpd.c @@ -610,8 +610,6 @@ verify_conf(keychain_t *chain, const struct yml_node *node) static const struct attr_info attrs[] = { {"host", true, &conf_verify_string}, {"port", false, &conf_verify_int}, - {"content", true, &conf_verify_particle}, - {"anchors", false, NULL}, MODULE_COMMON_ATTRS, }; diff --git a/modules/network.c b/modules/network.c index ed377c5..51839bf 100644 --- a/modules/network.c +++ b/modules/network.c @@ -544,8 +544,6 @@ verify_conf(keychain_t *chain, const struct yml_node *node) { static const struct attr_info attrs[] = { {"name", true, &conf_verify_string}, - {"content", true, &conf_verify_particle}, - {"anchors", false, NULL}, MODULE_COMMON_ATTRS, }; diff --git a/modules/removables.c b/modules/removables.c index 13822c8..17c06f0 100644 --- a/modules/removables.c +++ b/modules/removables.c @@ -582,8 +582,6 @@ verify_conf(keychain_t *chain, const struct yml_node *node) {"spacing", false, &conf_verify_int}, {"left-spacing", false, &conf_verify_int}, {"right-spacing", false, &conf_verify_int}, - {"content", true, &conf_verify_particle}, - {"anchors", false, NULL}, MODULE_COMMON_ATTRS, }; diff --git a/modules/sway_xkb.c b/modules/sway_xkb.c index 9350d84..114a361 100644 --- a/modules/sway_xkb.c +++ b/modules/sway_xkb.c @@ -350,8 +350,6 @@ verify_conf(keychain_t *chain, const struct yml_node *node) {"left-spacing", false, &conf_verify_int}, {"right-spacing", false, &conf_verify_int}, {"identifiers", true, &verify_identifiers}, - {"content", true, &conf_verify_particle}, - {"anchors", false, NULL}, MODULE_COMMON_ATTRS, }; diff --git a/modules/xkb.c b/modules/xkb.c index 627f422..16cc864 100644 --- a/modules/xkb.c +++ b/modules/xkb.c @@ -664,8 +664,6 @@ static bool verify_conf(keychain_t *chain, const struct yml_node *node) { static const struct attr_info attrs[] = { - {"content", true, &conf_verify_particle}, - {"anchors", false, NULL}, MODULE_COMMON_ATTRS, }; diff --git a/modules/xwindow.c b/modules/xwindow.c index a784e37..ad856a4 100644 --- a/modules/xwindow.c +++ b/modules/xwindow.c @@ -346,8 +346,6 @@ static bool verify_conf(keychain_t *chain, const struct yml_node *node) { static const struct attr_info attrs[] = { - {"content", true, &conf_verify_particle}, - {"anchors", false, NULL}, MODULE_COMMON_ATTRS, };