diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-01-24 09:46:28 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2016-01-24 09:46:28 -0500 |
commit | 4b48a8399a33f3bb5f5d55f87213bb4692a5f1f9 (patch) | |
tree | 1d820cd07f6ba693a89d43caf01b3c8b01390609 /swaybar/status_line.h | |
parent | c8cf3f70f979a6eb373ec1ebdf8f80bc42dcd633 (diff) | |
parent | a61a27c485d1b20fc7c5cbfc42b5d90148d82355 (diff) |
Merge pull request #467 from mikkeloscar/swaybar-refactor
[WIP] Swaybar refactor
Diffstat (limited to 'swaybar/status_line.h')
-rw-r--r-- | swaybar/status_line.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/swaybar/status_line.h b/swaybar/status_line.h new file mode 100644 index 00000000..273542dc --- /dev/null +++ b/swaybar/status_line.h @@ -0,0 +1,50 @@ +#ifndef _SWAYBAR_STATUS_LINE_H +#define _SWAYBAR_STATUS_LINE_H + +#include <stdint.h> +#include <stdbool.h> + +#include "list.h" +#include "bar.h" + +typedef enum {UNDEF, TEXT, I3BAR} command_protocol; + +struct status_line { + list_t *block_line; + const char *text_line; + command_protocol protocol; +}; + +struct status_block { + char *full_text, *short_text, *align; + bool urgent; + uint32_t color; + int min_width; + char *name, *instance; + bool separator; + int separator_block_width; + // Airblader features + uint32_t background; + uint32_t border; + int border_top; + int border_bottom; + int border_left; + int border_right; +}; + +/** + * Initialize status line struct. + */ +struct status_line *init_status_line(); + +/** + * handle status line activity. + */ +bool handle_status_line(struct bar *bar); + +/** + * Free status line struct. + */ +void free_status_line(struct status_line *line); + +#endif /* _SWAYBAR_STATUS_LINE_H */ |