summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sway/config.h16
-rw-r--r--include/swaybar/config.h8
-rw-r--r--include/swaybar/ipc.h1
3 files changed, 24 insertions, 1 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 00b5f25b..bc02c0fd 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -239,6 +239,12 @@ struct bar_config {
239 } colors; 239 } colors;
240}; 240};
241 241
242struct bar_binding {
243 uint32_t button;
244 bool release;
245 char *command;
246};
247
242struct border_colors { 248struct border_colors {
243 float border[4]; 249 float border[4];
244 float background[4]; 250 float background[4];
@@ -325,6 +331,12 @@ enum focus_wrapping_mode {
325 WRAP_FORCE 331 WRAP_FORCE
326}; 332};
327 333
334enum mouse_warping_mode {
335 WARP_NO,
336 WARP_OUTPUT,
337 WARP_CONTAINER
338};
339
328/** 340/**
329 * The configuration struct. The result of loading a config file. 341 * The configuration struct. The result of loading a config file.
330 */ 342 */
@@ -366,7 +378,7 @@ struct sway_config {
366 // Flags 378 // Flags
367 bool focus_follows_mouse; 379 bool focus_follows_mouse;
368 bool raise_floating; 380 bool raise_floating;
369 bool mouse_warping; 381 enum mouse_warping_mode mouse_warping;
370 enum focus_wrapping_mode focus_wrapping; 382 enum focus_wrapping_mode focus_wrapping;
371 bool active; 383 bool active;
372 bool failed; 384 bool failed;
@@ -527,6 +539,8 @@ struct bar_config *default_bar_config(void);
527 539
528void free_bar_config(struct bar_config *bar); 540void free_bar_config(struct bar_config *bar);
529 541
542void free_bar_binding(struct bar_binding *binding);
543
530void free_workspace_config(struct workspace_config *wsc); 544void free_workspace_config(struct workspace_config *wsc);
531 545
532/** 546/**
diff --git a/include/swaybar/config.h b/include/swaybar/config.h
index 5f5688cf..d0336c27 100644
--- a/include/swaybar/config.h
+++ b/include/swaybar/config.h
@@ -3,6 +3,7 @@
3#include <stdbool.h> 3#include <stdbool.h>
4#include <stdint.h> 4#include <stdint.h>
5#include <wayland-client.h> 5#include <wayland-client.h>
6#include "list.h"
6#include "util.h" 7#include "util.h"
7 8
8struct box_colors { 9struct box_colors {
@@ -17,6 +18,12 @@ struct config_output {
17 size_t index; 18 size_t index;
18}; 19};
19 20
21struct swaybar_binding {
22 uint32_t button;
23 char *command;
24 bool release;
25};
26
20struct swaybar_config { 27struct swaybar_config {
21 char *status_command; 28 char *status_command;
22 bool pango_markup; 29 bool pango_markup;
@@ -29,6 +36,7 @@ struct swaybar_config {
29 bool binding_mode_indicator; 36 bool binding_mode_indicator;
30 bool wrap_scroll; 37 bool wrap_scroll;
31 bool workspace_buttons; 38 bool workspace_buttons;
39 list_t *bindings;
32 struct wl_list outputs; // config_output::link 40 struct wl_list outputs; // config_output::link
33 bool all_outputs; 41 bool all_outputs;
34 int height; 42 int height;
diff --git a/include/swaybar/ipc.h b/include/swaybar/ipc.h
index 81e48a6b..8731dac2 100644
--- a/include/swaybar/ipc.h
+++ b/include/swaybar/ipc.h
@@ -7,5 +7,6 @@ bool ipc_initialize(struct swaybar *bar, const char *bar_id);
7bool handle_ipc_readable(struct swaybar *bar); 7bool handle_ipc_readable(struct swaybar *bar);
8void ipc_get_workspaces(struct swaybar *bar); 8void ipc_get_workspaces(struct swaybar *bar);
9void ipc_send_workspace_command(struct swaybar *bar, const char *ws); 9void ipc_send_workspace_command(struct swaybar *bar, const char *ws);
10void ipc_execute_binding(struct swaybar *bar, struct swaybar_binding *bind);
10 11
11#endif 12#endif