aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-03-28 23:56:02 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-03-29 22:11:08 -0400
commit5c9ad035db1bebba3f1954dd1f4328c6421776d4 (patch)
tree860eef96eaa4e7573384e64731f914d24e846cf5 /include
parentStart port of swaybar to layer shell (diff)
downloadsway-5c9ad035db1bebba3f1954dd1f4328c6421776d4.tar.gz
sway-5c9ad035db1bebba3f1954dd1f4328c6421776d4.tar.zst
sway-5c9ad035db1bebba3f1954dd1f4328c6421776d4.zip
Wire up basic IPC support
Diffstat (limited to 'include')
-rw-r--r--include/swaybar/bar.h3
-rw-r--r--include/swaybar/config.h17
-rw-r--r--include/swaybar/ipc.h5
3 files changed, 13 insertions, 12 deletions
diff --git a/include/swaybar/bar.h b/include/swaybar/bar.h
index 3ae8c0b3..df685f47 100644
--- a/include/swaybar/bar.h
+++ b/include/swaybar/bar.h
@@ -17,6 +17,9 @@ struct swaybar {
17 struct swaybar_config *config; 17 struct swaybar_config *config;
18 struct swaybar_output *focused_output; 18 struct swaybar_output *focused_output;
19 19
20 int ipc_event_socketfd;
21 int ipc_socketfd;
22
20 struct wl_list outputs; 23 struct wl_list outputs;
21}; 24};
22 25
diff --git a/include/swaybar/config.h b/include/swaybar/config.h
index 1bfe4843..4b3b5b34 100644
--- a/include/swaybar/config.h
+++ b/include/swaybar/config.h
@@ -2,21 +2,20 @@
2#define _SWAYBAR_CONFIG_H 2#define _SWAYBAR_CONFIG_H
3#include <stdbool.h> 3#include <stdbool.h>
4#include <stdint.h> 4#include <stdint.h>
5#include "list.h" 5#include <wayland-client.h>
6#include "util.h" 6#include "util.h"
7 7
8/**
9 * Colors for a box with background, border and text colors.
10 */
11struct box_colors { 8struct box_colors {
12 uint32_t border; 9 uint32_t border;
13 uint32_t background; 10 uint32_t background;
14 uint32_t text; 11 uint32_t text;
15}; 12};
16 13
17/** 14struct config_output {
18 * Swaybar config. 15 struct wl_list link;
19 */ 16 char *name;
17};
18
20struct swaybar_config { 19struct swaybar_config {
21 char *status_command; 20 char *status_command;
22 bool pango_markup; 21 bool pango_markup;
@@ -28,8 +27,7 @@ struct swaybar_config {
28 bool binding_mode_indicator; 27 bool binding_mode_indicator;
29 bool wrap_scroll; 28 bool wrap_scroll;
30 bool workspace_buttons; 29 bool workspace_buttons;
31 bool all_outputs; 30 struct wl_list outputs;
32 list_t *outputs;
33 int height; 31 int height;
34 32
35 struct { 33 struct {
@@ -51,5 +49,6 @@ struct swaybar_config {
51 49
52struct swaybar_config *init_config(); 50struct swaybar_config *init_config();
53void free_config(struct swaybar_config *config); 51void free_config(struct swaybar_config *config);
52uint32_t parse_position(const char *position);
54 53
55#endif 54#endif
diff --git a/include/swaybar/ipc.h b/include/swaybar/ipc.h
index 57a1b925..7f71a506 100644
--- a/include/swaybar/ipc.h
+++ b/include/swaybar/ipc.h
@@ -2,8 +2,7 @@
2#define _SWAYBAR_IPC_H 2#define _SWAYBAR_IPC_H
3#include "swaybar/bar.h" 3#include "swaybar/bar.h"
4 4
5void ipc_bar_init(struct swaybar *bar, const char *bar_id); 5void ipc_get_config(struct swaybar *bar, const char *bar_id);
6bool handle_ipc_event(struct swaybar *bar); 6void handle_ipc_event(struct swaybar *bar);
7void ipc_send_workspace_command(const char *workspace_name);
8 7
9#endif 8#endif