diff options
author | 2018-10-10 17:07:02 +0200 | |
---|---|---|
committer | 2018-10-10 17:07:02 +0200 | |
commit | 0a36d14d7a694a88580da1d9b83837afe608a2eb (patch) | |
tree | e21f0b633212c6b8084348f08fc68cec2efece8b /include | |
parent | Merge pull request #2814 from Emantor/mouse-warping-container (diff) | |
parent | Merge branch 'master' into bar-bindsym (diff) | |
download | sway-0a36d14d7a694a88580da1d9b83837afe608a2eb.tar.gz sway-0a36d14d7a694a88580da1d9b83837afe608a2eb.tar.zst sway-0a36d14d7a694a88580da1d9b83837afe608a2eb.zip |
Merge pull request #2798 from RedSoxFan/bar-bindsym
Implement bar bindsym
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/config.h | 8 | ||||
-rw-r--r-- | include/swaybar/config.h | 8 | ||||
-rw-r--r-- | include/swaybar/ipc.h | 1 |
3 files changed, 17 insertions, 0 deletions
diff --git a/include/sway/config.h b/include/sway/config.h index 0325042c..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 | ||
242 | struct bar_binding { | ||
243 | uint32_t button; | ||
244 | bool release; | ||
245 | char *command; | ||
246 | }; | ||
247 | |||
242 | struct border_colors { | 248 | struct border_colors { |
243 | float border[4]; | 249 | float border[4]; |
244 | float background[4]; | 250 | float background[4]; |
@@ -533,6 +539,8 @@ struct bar_config *default_bar_config(void); | |||
533 | 539 | ||
534 | void free_bar_config(struct bar_config *bar); | 540 | void free_bar_config(struct bar_config *bar); |
535 | 541 | ||
542 | void free_bar_binding(struct bar_binding *binding); | ||
543 | |||
536 | void free_workspace_config(struct workspace_config *wsc); | 544 | void free_workspace_config(struct workspace_config *wsc); |
537 | 545 | ||
538 | /** | 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 | ||
8 | struct box_colors { | 9 | struct box_colors { |
@@ -17,6 +18,12 @@ struct config_output { | |||
17 | size_t index; | 18 | size_t index; |
18 | }; | 19 | }; |
19 | 20 | ||
21 | struct swaybar_binding { | ||
22 | uint32_t button; | ||
23 | char *command; | ||
24 | bool release; | ||
25 | }; | ||
26 | |||
20 | struct swaybar_config { | 27 | struct 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); | |||
7 | bool handle_ipc_readable(struct swaybar *bar); | 7 | bool handle_ipc_readable(struct swaybar *bar); |
8 | void ipc_get_workspaces(struct swaybar *bar); | 8 | void ipc_get_workspaces(struct swaybar *bar); |
9 | void ipc_send_workspace_command(struct swaybar *bar, const char *ws); | 9 | void ipc_send_workspace_command(struct swaybar *bar, const char *ws); |
10 | void ipc_execute_binding(struct swaybar *bar, struct swaybar_binding *bind); | ||
10 | 11 | ||
11 | #endif | 12 | #endif |