aboutsummaryrefslogtreecommitdiff
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 {
} colors;
};
+struct bar_binding {
+ uint32_t button;
+ bool release;
+ char *command;
+};
+
struct border_colors {
float border[4];
float background[4];
@@ -325,6 +331,12 @@ enum focus_wrapping_mode {
WRAP_FORCE
};
+enum mouse_warping_mode {
+ WARP_NO,
+ WARP_OUTPUT,
+ WARP_CONTAINER
+};
+
/**
* The configuration struct. The result of loading a config file.
*/
@@ -366,7 +378,7 @@ struct sway_config {
// Flags
bool focus_follows_mouse;
bool raise_floating;
- bool mouse_warping;
+ enum mouse_warping_mode mouse_warping;
enum focus_wrapping_mode focus_wrapping;
bool active;
bool failed;
@@ -527,6 +539,8 @@ struct bar_config *default_bar_config(void);
void free_bar_config(struct bar_config *bar);
+void free_bar_binding(struct bar_binding *binding);
+
void free_workspace_config(struct workspace_config *wsc);
/**
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 @@
#include <stdbool.h>
#include <stdint.h>
#include <wayland-client.h>
+#include "list.h"
#include "util.h"
struct box_colors {
@@ -17,6 +18,12 @@ struct config_output {
size_t index;
};
+struct swaybar_binding {
+ uint32_t button;
+ char *command;
+ bool release;
+};
+
struct swaybar_config {
char *status_command;
bool pango_markup;
@@ -29,6 +36,7 @@ struct swaybar_config {
bool binding_mode_indicator;
bool wrap_scroll;
bool workspace_buttons;
+ list_t *bindings;
struct wl_list outputs; // config_output::link
bool all_outputs;
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);
bool handle_ipc_readable(struct swaybar *bar);
void ipc_get_workspaces(struct swaybar *bar);
void ipc_send_workspace_command(struct swaybar *bar, const char *ws);
+void ipc_execute_binding(struct swaybar *bar, struct swaybar_binding *bind);
#endif