diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-10-08 11:40:13 -0400 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2018-10-09 08:12:46 -0400 |
commit | 1c969e86f50065985ddf35b7fef62c14aa7688a5 (patch) | |
tree | 1d44b026ffb8cd67595b695ac92275ba320ee4d9 /swaybar/config.c | |
parent | e143c9613d350b74e02c5ac3c9a055ab26fc9588 (diff) |
Implement bar bindsym
Diffstat (limited to 'swaybar/config.c')
-rw-r--r-- | swaybar/config.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/swaybar/config.c b/swaybar/config.c index 4e851cca..c646fe66 100644 --- a/swaybar/config.c +++ b/swaybar/config.c @@ -3,6 +3,8 @@ #include <string.h> #include "swaybar/config.h" #include "wlr-layer-shell-unstable-v1-client-protocol.h" +#include "stringop.h" +#include "list.h" uint32_t parse_position(const char *position) { uint32_t horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | @@ -34,6 +36,7 @@ struct swaybar_config *init_config(void) { config->binding_mode_indicator = true; config->wrap_scroll = false; config->workspace_buttons = true; + config->bindings = create_list(); wl_list_init(&config->outputs); /* height */ @@ -74,6 +77,13 @@ void free_config(struct swaybar_config *config) { free(config->font); free(config->mode); free(config->sep_symbol); + while (config->bindings->length) { + struct swaybar_binding *binding = config->bindings->items[0]; + list_del(config->bindings, 0); + free(binding->command); + free(binding); + } + list_free(config->bindings); struct config_output *coutput, *tmp; wl_list_for_each_safe(coutput, tmp, &config->outputs, link) { wl_list_remove(&coutput->link); |