diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-02-27 16:18:50 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2016-02-27 16:18:50 -0500 |
commit | 3453910c3e887be900c69394b738e34d9d8ba095 (patch) | |
tree | 28e0d8d72557ac57a2f9aed5c94818c8ba20e97f /include/bar | |
parent | 5ff3fb1c0472d974f74c0329a10895cc76c83a55 (diff) | |
parent | 67bbcceba1433e41b5edfca32532b7d55a39a395 (diff) |
Merge pull request #492 from mikkeloscar/swaybar-multi-output
Display single swaybar on multiple outputs
Diffstat (limited to 'include/bar')
-rw-r--r-- | include/bar/bar.h | 11 | ||||
-rw-r--r-- | include/bar/config.h | 4 | ||||
-rw-r--r-- | include/bar/ipc.h | 2 |
3 files changed, 13 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 @@ struct bar { struct config *config; struct status_line *status; - struct output *output; - /* list_t *outputs; */ + list_t *outputs; int ipc_event_socketfd; int ipc_socketfd; @@ -22,6 +21,7 @@ struct output { struct registry *registry; list_t *workspaces; char *name; + int idx; }; struct workspace { @@ -35,7 +35,12 @@ struct workspace { /** * Setup bar. */ -void bar_setup(struct bar *bar, const char *socket_path, const char *bar_id, int desired_output); +void bar_setup(struct bar *bar, const char *socket_path, const char *bar_id); + +/** + * Create new output struct from name. + */ +struct output *new_output(const char *name); /** * Bar mainloop. diff --git a/include/bar/config.h b/include/bar/config.h index 508b9c42..fc938c38 100644 --- a/include/bar/config.h +++ b/include/bar/config.h @@ -4,6 +4,8 @@ #include <stdint.h> #include <stdbool.h> +#include "list.h" + /** * Colors for a box with background, border and text colors. */ @@ -25,6 +27,8 @@ struct config { bool strip_workspace_numbers; bool binding_mode_indicator; bool workspace_buttons; + bool all_outputs; + list_t *outputs; int height; 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 @@ /** * Initialize ipc connection to sway and get sway state, outputs, bar_config. */ -void ipc_bar_init(struct bar *bar, int outputi, const char *bar_id); +void ipc_bar_init(struct bar *bar, const char *bar_id); /** * Handle ipc event from sway. |