From aac1310ed0b9983a4a4a29ac469405d70465c278 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Fri, 12 Jul 2024 16:46:38 +0200 Subject: Cleanup --- src/config.h | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) (limited to 'src/config.h') diff --git a/src/config.h b/src/config.h index c24c968..70c828c 100644 --- a/src/config.h +++ b/src/config.h @@ -6,31 +6,22 @@ #include "block.h" -//typedef struct { -// char *label; -// char *type; -// int x_padding, y_padding; -// color_t color; -// char *text; -// color_t text_color; -// int line_width; -// color_t line_color; -// bool hidden; -// double interval; -// int min_width, max_width; -//} config_block_t; +typedef enum { + CONFIG_STRING, + CONFIG_INT, + CONFIG_UINT, + CONFIG_DOUBLE, + CONFIG_BOOL, + CONFIG_COLOR, +} config_type_t; typedef struct { - char *label; - size_t n_pairs; - pair_t *pairs; -} config_section_t; + const char *key; + config_type_t type; + size_t offset; +} config_entry_t; typedef struct { - size_t n_blocks; - config_section_t *blocks; - size_t n_actions; - config_section_t *actions; char *font; char *monitor; uint32_t height; -- cgit v1.2.3