forked from external/yambar
config: use dashes, '-', instead of underscores, '_' in attribute names
This commit is contained in:
parent
b0705578b0
commit
75bdd2ad3c
5 changed files with 17 additions and 17 deletions
|
@ -47,7 +47,7 @@ add_executable(f00bar
|
||||||
particles/empty.c particles/empty.h
|
particles/empty.c particles/empty.h
|
||||||
particles/list.c particles/list.h
|
particles/list.c particles/list.h
|
||||||
particles/map.c particles/map.h
|
particles/map.c particles/map.h
|
||||||
particles/progress_bar.c particles/progress_bar.h
|
particles/progress-bar.c particles/progress-bar.h
|
||||||
particles/ramp.c particles/ramp.h
|
particles/ramp.c particles/ramp.h
|
||||||
particles/string.c particles/string.h
|
particles/string.c particles/string.h
|
||||||
|
|
||||||
|
|
|
@ -334,9 +334,9 @@ verify_particle_dictionary(keychain_t *chain, const struct yml_node *node)
|
||||||
|
|
||||||
#define COMMON_ATTRS \
|
#define COMMON_ATTRS \
|
||||||
{"margin", false, &verify_int}, \
|
{"margin", false, &verify_int}, \
|
||||||
{"left_margin", false, &verify_int}, \
|
{"left-margin", false, &verify_int}, \
|
||||||
{"right_margin", false, &verify_int}, \
|
{"right-margin", false, &verify_int}, \
|
||||||
{"on_click", false, &verify_string},
|
{"on-click", false, &verify_string},
|
||||||
|
|
||||||
static const struct attr_info empty[] = {
|
static const struct attr_info empty[] = {
|
||||||
COMMON_ATTRS
|
COMMON_ATTRS
|
||||||
|
@ -345,8 +345,8 @@ verify_particle_dictionary(keychain_t *chain, const struct yml_node *node)
|
||||||
static const struct attr_info list[] = {
|
static const struct attr_info list[] = {
|
||||||
{"items", true, &verify_list_items},
|
{"items", true, &verify_list_items},
|
||||||
{"spacing", false, &verify_int},
|
{"spacing", false, &verify_int},
|
||||||
{"left_spacing", false, &verify_int},
|
{"left-spacing", false, &verify_int},
|
||||||
{"right_spacing", false, &verify_int},
|
{"right-spacing", false, &verify_int},
|
||||||
COMMON_ATTRS
|
COMMON_ATTRS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -394,7 +394,7 @@ verify_particle_dictionary(keychain_t *chain, const struct yml_node *node)
|
||||||
{"empty", empty, sizeof(empty) / sizeof(empty[0])},
|
{"empty", empty, sizeof(empty) / sizeof(empty[0])},
|
||||||
{"list", list, sizeof(list) / sizeof(list[0])},
|
{"list", list, sizeof(list) / sizeof(list[0])},
|
||||||
{"map", map, sizeof(map) / sizeof(map[0])},
|
{"map", map, sizeof(map) / sizeof(map[0])},
|
||||||
{"progress_bar", progress_bar, sizeof(progress_bar) / sizeof(progress_bar[0])},
|
{"progress-bar", progress_bar, sizeof(progress_bar) / sizeof(progress_bar[0])},
|
||||||
{"ramp", ramp, sizeof(ramp) / sizeof(ramp[0])},
|
{"ramp", ramp, sizeof(ramp) / sizeof(ramp[0])},
|
||||||
{"string", string, sizeof(string) / sizeof(string[0])},
|
{"string", string, sizeof(string) / sizeof(string[0])},
|
||||||
};
|
};
|
||||||
|
@ -496,7 +496,7 @@ verify_module(keychain_t *chain, const struct yml_node *node)
|
||||||
|
|
||||||
static const struct attr_info battery[] = {
|
static const struct attr_info battery[] = {
|
||||||
{"name", true, &verify_string},
|
{"name", true, &verify_string},
|
||||||
{"poll_interval", false, &verify_int},
|
{"poll-interval", false, &verify_int},
|
||||||
{"content", true, &verify_particle},
|
{"content", true, &verify_particle},
|
||||||
{"anchors", false, NULL},
|
{"anchors", false, NULL},
|
||||||
};
|
};
|
||||||
|
@ -522,8 +522,8 @@ verify_module(keychain_t *chain, const struct yml_node *node)
|
||||||
|
|
||||||
static const struct attr_info i3[] = {
|
static const struct attr_info i3[] = {
|
||||||
{"spacing", false, &verify_int},
|
{"spacing", false, &verify_int},
|
||||||
{"left_spacing", false, &verify_int},
|
{"left-spacing", false, &verify_int},
|
||||||
{"right_spacing", false, &verify_int},
|
{"right-spacing", false, &verify_int},
|
||||||
{"content", true, &verify_i3_content},
|
{"content", true, &verify_i3_content},
|
||||||
{"anchors", false, NULL},
|
{"anchors", false, NULL},
|
||||||
};
|
};
|
||||||
|
@ -536,8 +536,8 @@ verify_module(keychain_t *chain, const struct yml_node *node)
|
||||||
|
|
||||||
static const struct attr_info removables[] = {
|
static const struct attr_info removables[] = {
|
||||||
{"spacing", false, &verify_int},
|
{"spacing", false, &verify_int},
|
||||||
{"left_spacing", false, &verify_int},
|
{"left-spacing", false, &verify_int},
|
||||||
{"right_spacing", false, &verify_int},
|
{"right-spacing", false, &verify_int},
|
||||||
{"content", true, &verify_particle},
|
{"content", true, &verify_particle},
|
||||||
{"anchors", false, NULL},
|
{"anchors", false, NULL},
|
||||||
};
|
};
|
||||||
|
@ -641,8 +641,8 @@ config_verify_bar(const struct yml_node *bar)
|
||||||
{"background", true, &verify_color},
|
{"background", true, &verify_color},
|
||||||
|
|
||||||
{"spacing", false, &verify_int},
|
{"spacing", false, &verify_int},
|
||||||
{"left_spacing", false, &verify_int},
|
{"left-spacing", false, &verify_int},
|
||||||
{"right_spacing", false, &verify_int},
|
{"right-spacing", false, &verify_int},
|
||||||
|
|
||||||
{"margin", false, &verify_int},
|
{"margin", false, &verify_int},
|
||||||
{"left_margin", false, &verify_int},
|
{"left_margin", false, &verify_int},
|
||||||
|
|
4
config.c
4
config.c
|
@ -16,7 +16,7 @@
|
||||||
#include "particles/empty.h"
|
#include "particles/empty.h"
|
||||||
#include "particles/list.h"
|
#include "particles/list.h"
|
||||||
#include "particles/map.h"
|
#include "particles/map.h"
|
||||||
#include "particles/progress_bar.h"
|
#include "particles/progress-bar.h"
|
||||||
#include "particles/ramp.h"
|
#include "particles/ramp.h"
|
||||||
#include "particles/string.h"
|
#include "particles/string.h"
|
||||||
|
|
||||||
|
@ -351,7 +351,7 @@ particle_from_config(const struct yml_node *node, const struct font *parent_font
|
||||||
else if (strcmp(type, "ramp") == 0)
|
else if (strcmp(type, "ramp") == 0)
|
||||||
ret = particle_ramp_from_config(
|
ret = particle_ramp_from_config(
|
||||||
pair.value, parent_font, left, right, on_click_template);
|
pair.value, parent_font, left, right, on_click_template);
|
||||||
else if (strcmp(type, "progress_bar") == 0)
|
else if (strcmp(type, "progress-bar") == 0)
|
||||||
ret = particle_progress_bar_from_config(
|
ret = particle_progress_bar_from_config(
|
||||||
pair.value, parent_font, left, right, on_click_template);
|
pair.value, parent_font, left, right, on_click_template);
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "progress_bar.h"
|
#include "progress-bar.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
Loading…
Add table
Reference in a new issue