diff options
Diffstat (limited to 'include/bar')
-rw-r--r-- | include/bar/bar.h | 11 | ||||
-rw-r--r-- | include/bar/config.h | 3 | ||||
-rw-r--r-- | include/bar/ipc.h | 2 |
3 files changed, 12 insertions, 4 deletions
diff --git a/include/bar/bar.h b/include/bar/bar.h index 89496da6..c20efc55 100644 --- a/include/bar/bar.h +++ b/include/bar/bar.h | |||
@@ -8,8 +8,7 @@ | |||
8 | struct bar { | 8 | struct bar { |
9 | struct config *config; | 9 | struct config *config; |
10 | struct status_line *status; | 10 | struct status_line *status; |
11 | struct output *output; | 11 | list_t *outputs; |
12 | /* list_t *outputs; */ | ||
13 | 12 | ||
14 | int ipc_event_socketfd; | 13 | int ipc_event_socketfd; |
15 | int ipc_socketfd; | 14 | int ipc_socketfd; |
@@ -22,6 +21,7 @@ struct output { | |||
22 | struct registry *registry; | 21 | struct registry *registry; |
23 | list_t *workspaces; | 22 | list_t *workspaces; |
24 | char *name; | 23 | char *name; |
24 | int idx; | ||
25 | }; | 25 | }; |
26 | 26 | ||
27 | struct workspace { | 27 | struct workspace { |
@@ -35,7 +35,12 @@ struct workspace { | |||
35 | /** | 35 | /** |
36 | * Setup bar. | 36 | * Setup bar. |
37 | */ | 37 | */ |
38 | void bar_setup(struct bar *bar, const char *socket_path, const char *bar_id, int desired_output); | 38 | void bar_setup(struct bar *bar, const char *socket_path, const char *bar_id); |
39 | |||
40 | /** | ||
41 | * Create new output struct from name. | ||
42 | */ | ||
43 | struct output *new_output(const char *name); | ||
39 | 44 | ||
40 | /** | 45 | /** |
41 | * Bar mainloop. | 46 | * Bar mainloop. |
diff --git a/include/bar/config.h b/include/bar/config.h index 508b9c42..dfad0ba4 100644 --- a/include/bar/config.h +++ b/include/bar/config.h | |||
@@ -4,6 +4,8 @@ | |||
4 | #include <stdint.h> | 4 | #include <stdint.h> |
5 | #include <stdbool.h> | 5 | #include <stdbool.h> |
6 | 6 | ||
7 | #include "list.h" | ||
8 | |||
7 | /** | 9 | /** |
8 | * Colors for a box with background, border and text colors. | 10 | * Colors for a box with background, border and text colors. |
9 | */ | 11 | */ |
@@ -25,6 +27,7 @@ struct config { | |||
25 | bool strip_workspace_numbers; | 27 | bool strip_workspace_numbers; |
26 | bool binding_mode_indicator; | 28 | bool binding_mode_indicator; |
27 | bool workspace_buttons; | 29 | bool workspace_buttons; |
30 | list_t *outputs; | ||
28 | 31 | ||
29 | int height; | 32 | int height; |
30 | 33 | ||
diff --git a/include/bar/ipc.h b/include/bar/ipc.h index c3f661f8..741c067b 100644 --- a/include/bar/ipc.h +++ b/include/bar/ipc.h | |||
@@ -6,7 +6,7 @@ | |||
6 | /** | 6 | /** |
7 | * Initialize ipc connection to sway and get sway state, outputs, bar_config. | 7 | * Initialize ipc connection to sway and get sway state, outputs, bar_config. |
8 | */ | 8 | */ |
9 | void ipc_bar_init(struct bar *bar, int outputi, const char *bar_id); | 9 | void ipc_bar_init(struct bar *bar, const char *bar_id); |
10 | 10 | ||
11 | /** | 11 | /** |
12 | * Handle ipc event from sway. | 12 | * Handle ipc event from sway. |