aboutsummaryrefslogtreecommitdiff
path: root/swaybar/status_line.h
diff options
context:
space:
mode:
authorMikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-01-23 20:55:01 +0100
committerMikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-01-24 14:22:19 +0100
commita6349a2444571624c792ca222dff57c7f1711c71 (patch)
tree486e5df9eff701f75ce05d80a3e16c397ad596dc /swaybar/status_line.h
parentbb986cb33637147663c115c8b8f8bdff170f23a8 (diff)
swaybar: feactor render, statusline
Diffstat (limited to 'swaybar/status_line.h')
-rw-r--r--swaybar/status_line.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/swaybar/status_line.h b/swaybar/status_line.h
new file mode 100644
index 00000000..36020aeb
--- /dev/null
+++ b/swaybar/status_line.h
@@ -0,0 +1,45 @@
+#ifndef _SWAYBAR_STATUS_LINE_H
+#define _SWAYBAR_STATUS_LINE_H
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#include "list.h"
+#include "state.h"
+
+typedef enum {UNDEF, TEXT, I3BAR} command_protocol;
+
+struct status_line {
+ list_t *block_line;
+ 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 swaybar_state *st);
+
+#endif /* _SWAYBAR_STATUS_LINE_H */