summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-02-22 17:27:17 +0100
committerLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-02-27 22:12:35 +0100
commit6d57f03028b4b32b4377d869be8de9a7e6aa55ee (patch)
tree786e749fd53707e36e4b9927516f8375857eec87 /include
parentMake protocol specifications follow the DTD (diff)
downloadsway-6d57f03028b4b32b4377d869be8de9a7e6aa55ee.tar.gz
sway-6d57f03028b4b32b4377d869be8de9a7e6aa55ee.tar.zst
sway-6d57f03028b4b32b4377d869be8de9a7e6aa55ee.zip
Make single bar handle multiple outputs
Diffstat (limited to 'include')
-rw-r--r--include/bar/bar.h11
-rw-r--r--include/bar/config.h3
-rw-r--r--include/bar/ipc.h2
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 @@
8struct bar { 8struct 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
27struct workspace { 27struct workspace {
@@ -35,7 +35,12 @@ struct workspace {
35/** 35/**
36 * Setup bar. 36 * Setup bar.
37 */ 37 */
38void bar_setup(struct bar *bar, const char *socket_path, const char *bar_id, int desired_output); 38void bar_setup(struct bar *bar, const char *socket_path, const char *bar_id);
39
40/**
41 * Create new output struct from name.
42 */
43struct 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 */
9void ipc_bar_init(struct bar *bar, int outputi, const char *bar_id); 9void 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.