aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Ian Fan <ianfan0@gmail.com>2018-10-12 21:14:52 +0100
committerLibravatar Ian Fan <ianfan0@gmail.com>2018-10-14 13:33:12 +0100
commit2f1fd8072673b1824f37759e14f5388d7a87fb5c (patch)
tree948b7912a2341c2d0b903258b444173b3fd4d1f3 /include
parentswaybar: handle mode/hidden_state changes (diff)
downloadsway-2f1fd8072673b1824f37759e14f5388d7a87fb5c.tar.gz
sway-2f1fd8072673b1824f37759e14f5388d7a87fb5c.tar.zst
sway-2f1fd8072673b1824f37759e14f5388d7a87fb5c.zip
swaybar: show hidden bar on key event
Since wayland does not currently allow swaybar to create global keybinds, this is handled within sway and sent to the bar using a custom event, so as not to pollute existing events, called bar_state_update.
Diffstat (limited to 'include')
-rw-r--r--include/ipc.h3
-rw-r--r--include/sway/config.h1
-rw-r--r--include/sway/ipc-server.h1
-rw-r--r--include/swaybar/config.h1
4 files changed, 6 insertions, 0 deletions
diff --git a/include/ipc.h b/include/ipc.h
index a3f60e19..9063b933 100644
--- a/include/ipc.h
+++ b/include/ipc.h
@@ -30,6 +30,9 @@ enum ipc_command_type {
30 IPC_EVENT_BINDING = ((1<<31) | 5), 30 IPC_EVENT_BINDING = ((1<<31) | 5),
31 IPC_EVENT_SHUTDOWN = ((1<<31) | 6), 31 IPC_EVENT_SHUTDOWN = ((1<<31) | 6),
32 IPC_EVENT_TICK = ((1<<31) | 7), 32 IPC_EVENT_TICK = ((1<<31) | 7),
33
34 // sway-specific event types
35 IPC_EVENT_BAR_STATE_UPDATE = ((1<<31) | 20),
33}; 36};
34 37
35#endif 38#endif
diff --git a/include/sway/config.h b/include/sway/config.h
index f21ecbb1..be5a00b5 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -191,6 +191,7 @@ struct bar_config {
191 * In "show" mode, it will always be shown on top of the active workspace. 191 * In "show" mode, it will always be shown on top of the active workspace.
192 */ 192 */
193 char *hidden_state; 193 char *hidden_state;
194 bool visible_by_modifier; // only relevant in "hide" mode
194 /** 195 /**
195 * Id name used to identify the bar through IPC. 196 * Id name used to identify the bar through IPC.
196 * 197 *
diff --git a/include/sway/ipc-server.h b/include/sway/ipc-server.h
index 80180ec4..3c43f74d 100644
--- a/include/sway/ipc-server.h
+++ b/include/sway/ipc-server.h
@@ -15,6 +15,7 @@ void ipc_event_workspace(struct sway_workspace *old,
15 struct sway_workspace *new, const char *change); 15 struct sway_workspace *new, const char *change);
16void ipc_event_window(struct sway_container *window, const char *change); 16void ipc_event_window(struct sway_container *window, const char *change);
17void ipc_event_barconfig_update(struct bar_config *bar); 17void ipc_event_barconfig_update(struct bar_config *bar);
18void ipc_event_bar_state_update(struct bar_config *bar);
18void ipc_event_mode(const char *mode, bool pango); 19void ipc_event_mode(const char *mode, bool pango);
19void ipc_event_shutdown(const char *reason); 20void ipc_event_shutdown(const char *reason);
20void ipc_event_binding(struct sway_binding *binding); 21void ipc_event_binding(struct sway_binding *binding);
diff --git a/include/swaybar/config.h b/include/swaybar/config.h
index 10904bca..5d40790a 100644
--- a/include/swaybar/config.h
+++ b/include/swaybar/config.h
@@ -32,6 +32,7 @@ struct swaybar_config {
32 char *sep_symbol; 32 char *sep_symbol;
33 char *mode; 33 char *mode;
34 char *hidden_state; 34 char *hidden_state;
35 char *modifier;
35 bool strip_workspace_numbers; 36 bool strip_workspace_numbers;
36 bool binding_mode_indicator; 37 bool binding_mode_indicator;
37 bool wrap_scroll; 38 bool wrap_scroll;