diff options
author | Ian Fan <ianfan0@gmail.com> | 2018-10-12 21:14:52 +0100 |
---|---|---|
committer | Ian Fan <ianfan0@gmail.com> | 2018-10-14 13:33:12 +0100 |
commit | 2f1fd8072673b1824f37759e14f5388d7a87fb5c (patch) | |
tree | 948b7912a2341c2d0b903258b444173b3fd4d1f3 /include | |
parent | bcc61e5147fb57a3b4bfb9a2a33065a0cf6da67b (diff) | |
download | sway-2f1fd8072673b1824f37759e14f5388d7a87fb5c.tar.xz |
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.h | 3 | ||||
-rw-r--r-- | include/sway/config.h | 1 | ||||
-rw-r--r-- | include/sway/ipc-server.h | 1 | ||||
-rw-r--r-- | include/swaybar/config.h | 1 |
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 { IPC_EVENT_BINDING = ((1<<31) | 5), IPC_EVENT_SHUTDOWN = ((1<<31) | 6), IPC_EVENT_TICK = ((1<<31) | 7), + + // sway-specific event types + IPC_EVENT_BAR_STATE_UPDATE = ((1<<31) | 20), }; #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 { * In "show" mode, it will always be shown on top of the active workspace. */ char *hidden_state; + bool visible_by_modifier; // only relevant in "hide" mode /** * Id name used to identify the bar through IPC. * 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, struct sway_workspace *new, const char *change); void ipc_event_window(struct sway_container *window, const char *change); void ipc_event_barconfig_update(struct bar_config *bar); +void ipc_event_bar_state_update(struct bar_config *bar); void ipc_event_mode(const char *mode, bool pango); void ipc_event_shutdown(const char *reason); void 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 { char *sep_symbol; char *mode; char *hidden_state; + char *modifier; bool strip_workspace_numbers; bool binding_mode_indicator; bool wrap_scroll; |