diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-09-01 08:18:37 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2016-09-01 08:18:37 -0400 |
commit | 416417a54c5875abcdc257b6ad10ff086c35eefc (patch) | |
tree | 00f20884a05d05e620a4a24bba8595557cd41405 /include/swaybar/config.h | |
parent | Merge pull request #876 from zandrmartin/patch-1 (diff) | |
download | sway-416417a54c5875abcdc257b6ad10ff086c35eefc.tar.gz sway-416417a54c5875abcdc257b6ad10ff086c35eefc.tar.zst sway-416417a54c5875abcdc257b6ad10ff086c35eefc.zip |
Reorganize includes
Diffstat (limited to 'include/swaybar/config.h')
-rw-r--r-- | include/swaybar/config.h | 71 |
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 | */ | ||
13 | struct box_colors { | ||
14 | uint32_t border; | ||
15 | uint32_t background; | ||
16 | uint32_t text; | ||
17 | }; | ||
18 | |||
19 | /** | ||
20 | * Swaybar config. | ||
21 | */ | ||
22 | struct 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 | */ | ||
54 | uint32_t parse_position(const char *position); | ||
55 | |||
56 | /** | ||
57 | * Parse font. | ||
58 | */ | ||
59 | char *parse_font(const char *font); | ||
60 | |||
61 | /** | ||
62 | * Initialize default sway config. | ||
63 | */ | ||
64 | struct config *init_config(); | ||
65 | |||
66 | /** | ||
67 | * Free config struct. | ||
68 | */ | ||
69 | void free_config(struct config *config); | ||
70 | |||
71 | #endif /* _SWAYBAR_CONFIG_H */ | ||