mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
Implement bar bindsym
This commit is contained in:
parent
e143c9613d
commit
1c969e86f5
10 changed files with 172 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue