From 8463a2896a932cd99f3dc93608b03cb4aba93293 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Sat, 28 Jul 2018 09:34:25 -0400 Subject: swaynag: implement config file support --- include/swaynag/types.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 include/swaynag/types.h (limited to 'include/swaynag/types.h') diff --git a/include/swaynag/types.h b/include/swaynag/types.h new file mode 100644 index 00000000..32056514 --- /dev/null +++ b/include/swaynag/types.h @@ -0,0 +1,25 @@ +#ifndef _SWAY_NAGBAR_TYPES_H +#define _SWAY_NAGBAR_TYPES_H + +struct sway_nagbar_type { + char *name; + uint32_t button_background; + uint32_t background; + uint32_t text; + uint32_t border; + uint32_t border_bottom; +}; + +void nagbar_types_add_default(list_t *types); + +struct sway_nagbar_type *nagbar_type_get(list_t *types, char *name); + +struct sway_nagbar_type *nagbar_type_clone(struct sway_nagbar_type *type); + +void nagbar_type_free(struct sway_nagbar_type *type); + +void nagbar_types_free(list_t *types); + +int nagbar_parse_type(int argc, char **argv, struct sway_nagbar_type *type); + +#endif -- cgit v1.2.3 From a6145914c60351d8e541192c7fe35556f8e02507 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Sat, 28 Jul 2018 23:15:12 -0400 Subject: swaynag: refactor {sway_,}nagbar to swaynag --- include/swaynag/types.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'include/swaynag/types.h') diff --git a/include/swaynag/types.h b/include/swaynag/types.h index 32056514..af83bd83 100644 --- a/include/swaynag/types.h +++ b/include/swaynag/types.h @@ -1,7 +1,7 @@ -#ifndef _SWAY_NAGBAR_TYPES_H -#define _SWAY_NAGBAR_TYPES_H +#ifndef _SWAYNAG_TYPES_H +#define _SWAYNAG_TYPES_H -struct sway_nagbar_type { +struct swaynag_type { char *name; uint32_t button_background; uint32_t background; @@ -10,16 +10,16 @@ struct sway_nagbar_type { uint32_t border_bottom; }; -void nagbar_types_add_default(list_t *types); +void swaynag_types_add_default(list_t *types); -struct sway_nagbar_type *nagbar_type_get(list_t *types, char *name); +struct swaynag_type *swaynag_type_get(list_t *types, char *name); -struct sway_nagbar_type *nagbar_type_clone(struct sway_nagbar_type *type); +struct swaynag_type *swaynag_type_clone(struct swaynag_type *type); -void nagbar_type_free(struct sway_nagbar_type *type); +void swaynag_type_free(struct swaynag_type *type); -void nagbar_types_free(list_t *types); +void swaynag_types_free(list_t *types); -int nagbar_parse_type(int argc, char **argv, struct sway_nagbar_type *type); +int swaynag_parse_type(int argc, char **argv, struct swaynag_type *type); #endif -- cgit v1.2.3 From e01acb6097b583fcf2f6d0e0afe1bd878dd9b683 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Sun, 29 Jul 2018 22:42:03 -0400 Subject: swaynag: allow more config options --- include/swaynag/types.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'include/swaynag/types.h') diff --git a/include/swaynag/types.h b/include/swaynag/types.h index af83bd83..2183ce22 100644 --- a/include/swaynag/types.h +++ b/include/swaynag/types.h @@ -3,11 +3,25 @@ struct swaynag_type { char *name; + + char *font; + char *output; + uint32_t anchors; + uint32_t button_background; uint32_t background; uint32_t text; uint32_t border; uint32_t border_bottom; + + uint32_t bar_border_thickness; + uint32_t message_padding; + uint32_t details_border_thickness; + uint32_t button_border_thickness; + uint32_t button_gap; + uint32_t button_gap_close; + uint32_t button_margin_right; + uint32_t button_padding; }; void swaynag_types_add_default(list_t *types); @@ -16,10 +30,10 @@ struct swaynag_type *swaynag_type_get(list_t *types, char *name); struct swaynag_type *swaynag_type_clone(struct swaynag_type *type); +void swaynag_type_merge(struct swaynag_type *dest, struct swaynag_type *src); + void swaynag_type_free(struct swaynag_type *type); void swaynag_types_free(list_t *types); -int swaynag_parse_type(int argc, char **argv, struct swaynag_type *type); - #endif -- cgit v1.2.3