summaryrefslogtreecommitdiffstats
path: root/include/swaybar/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/swaybar/config.h')
-rw-r--r--include/swaybar/config.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/include/swaybar/config.h b/include/swaybar/config.h
new file mode 100644
index 00000000..934116ca
--- /dev/null
+++ b/include/swaybar/config.h
@@ -0,0 +1,71 @@
1#ifndef _SWAYBAR_CONFIG_H
2#define _SWAYBAR_CONFIG_H
3
4#include <stdint.h>
5#include <stdbool.h>
6
7#include "list.h"
8#include "util.h"
9
10/**
11 * Colors for a box with background, border and text colors.
12 */
13struct box_colors {
14 uint32_t border;
15 uint32_t background;
16 uint32_t text;
17};
18
19/**
20 * Swaybar config.
21 */
22struct config {
23 char *status_command;
24 bool pango_markup;
25 uint32_t position;
26 char *font;
27 char *sep_symbol;
28 char *mode;
29 bool strip_workspace_numbers;
30 bool binding_mode_indicator;
31 bool wrap_scroll;
32 bool workspace_buttons;
33 bool all_outputs;
34 list_t *outputs;
35
36 int height;
37
38 struct {
39 uint32_t background;
40 uint32_t statusline;
41 uint32_t separator;
42
43 struct box_colors focused_workspace;
44 struct box_colors active_workspace;
45 struct box_colors inactive_workspace;
46 struct box_colors urgent_workspace;
47 struct box_colors binding_mode;
48 } colors;
49};
50
51/**
52 * Parse position top|bottom|left|right.
53 */
54uint32_t parse_position(const char *position);
55
56/**
57 * Parse font.
58 */
59char *parse_font(const char *font);
60
61/**
62 * Initialize default sway config.
63 */
64struct config *init_config();
65
66/**
67 * Free config struct.
68 */
69void free_config(struct config *config);
70
71#endif /* _SWAYBAR_CONFIG_H */