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.
This commit is contained in:
Ian Fan 2018-10-12 21:14:52 +01:00
parent bcc61e5147
commit 2f1fd80726
8 changed files with 66 additions and 7 deletions

View file

@ -16,6 +16,7 @@
#include "stringop.h"
#include "list.h"
#include "log.h"
#include "util.h"
static void terminate_swaybar(pid_t pid) {
wlr_log(WLR_DEBUG, "Terminating swaybar %d", pid);
@ -101,6 +102,7 @@ struct bar_config *default_bar_config(void) {
bar->binding_mode_indicator = true;
bar->verbose = false;
bar->pid = 0;
bar->modifier = get_modifier_mask_by_name("Mod4");
if (!(bar->mode = strdup("dock"))) {
goto cleanup;
}