diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-28 23:04:20 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-29 22:11:08 -0400 |
commit | cab1352801b62d1b8a12ca1c995cb24445ce4bc9 (patch) | |
tree | bc67373916c06d48700c4f69b8c2470a2f86887f /include/swaybar/config.h | |
parent | Allow sway IPC clients to fall back to i3 socket (diff) | |
download | sway-cab1352801b62d1b8a12ca1c995cb24445ce4bc9.tar.gz sway-cab1352801b62d1b8a12ca1c995cb24445ce4bc9.tar.zst sway-cab1352801b62d1b8a12ca1c995cb24445ce4bc9.zip |
Start port of swaybar to layer shell
This starts up the event loop and wayland display and shims out the
basic top level rendering concepts. Also includes some changes to
incorporate pango into the 1.x codebase properly.
Diffstat (limited to 'include/swaybar/config.h')
-rw-r--r-- | include/swaybar/config.h | 43 |
1 files changed, 6 insertions, 37 deletions
diff --git a/include/swaybar/config.h b/include/swaybar/config.h index 651f0ee3..1bfe4843 100644 --- a/include/swaybar/config.h +++ b/include/swaybar/config.h | |||
@@ -1,9 +1,7 @@ | |||
1 | #ifndef _SWAYBAR_CONFIG_H | 1 | #ifndef _SWAYBAR_CONFIG_H |
2 | #define _SWAYBAR_CONFIG_H | 2 | #define _SWAYBAR_CONFIG_H |
3 | |||
4 | #include <stdint.h> | ||
5 | #include <stdbool.h> | 3 | #include <stdbool.h> |
6 | 4 | #include <stdint.h> | |
7 | #include "list.h" | 5 | #include "list.h" |
8 | #include "util.h" | 6 | #include "util.h" |
9 | 7 | ||
@@ -19,10 +17,10 @@ struct box_colors { | |||
19 | /** | 17 | /** |
20 | * Swaybar config. | 18 | * Swaybar config. |
21 | */ | 19 | */ |
22 | struct config { | 20 | struct swaybar_config { |
23 | char *status_command; | 21 | char *status_command; |
24 | bool pango_markup; | 22 | bool pango_markup; |
25 | uint32_t position; | 23 | uint32_t position; // zwlr_layer_surface_v1_anchor |
26 | char *font; | 24 | char *font; |
27 | char *sep_symbol; | 25 | char *sep_symbol; |
28 | char *mode; | 26 | char *mode; |
@@ -32,18 +30,6 @@ struct config { | |||
32 | bool workspace_buttons; | 30 | bool workspace_buttons; |
33 | bool all_outputs; | 31 | bool all_outputs; |
34 | list_t *outputs; | 32 | list_t *outputs; |
35 | |||
36 | #ifdef ENABLE_TRAY | ||
37 | // Tray | ||
38 | char *tray_output; | ||
39 | char *icon_theme; | ||
40 | |||
41 | uint32_t tray_padding; | ||
42 | uint32_t activate_button; | ||
43 | uint32_t context_button; | ||
44 | uint32_t secondary_button; | ||
45 | #endif | ||
46 | |||
47 | int height; | 33 | int height; |
48 | 34 | ||
49 | struct { | 35 | struct { |
@@ -63,24 +49,7 @@ struct config { | |||
63 | } colors; | 49 | } colors; |
64 | }; | 50 | }; |
65 | 51 | ||
66 | /** | 52 | struct swaybar_config *init_config(); |
67 | * Parse position top|bottom|left|right. | 53 | void free_config(struct swaybar_config *config); |
68 | */ | ||
69 | uint32_t parse_position(const char *position); | ||
70 | |||
71 | /** | ||
72 | * Parse font. | ||
73 | */ | ||
74 | char *parse_font(const char *font); | ||
75 | |||
76 | /** | ||
77 | * Initialize default sway config. | ||
78 | */ | ||
79 | struct config *init_config(); | ||
80 | |||
81 | /** | ||
82 | * Free config struct. | ||
83 | */ | ||
84 | void free_config(struct config *config); | ||
85 | 54 | ||
86 | #endif /* _SWAYBAR_CONFIG_H */ | 55 | #endif |