From 6b03c68775c9c638def342c82b1fa3beffa52645 Mon Sep 17 00:00:00 2001 From: Ian Fan Date: Sun, 9 Dec 2018 15:10:41 +0000 Subject: swaybar: implement tray config --- sway/config/bar.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sway/config/bar.c') diff --git a/sway/config/bar.c b/sway/config/bar.c index 45c9e998..670219f1 100644 --- a/sway/config/bar.c +++ b/sway/config/bar.c @@ -12,6 +12,7 @@ #include #include "sway/config.h" #include "sway/output.h" +#include "config.h" #include "stringop.h" #include "list.h" #include "log.h" @@ -77,6 +78,10 @@ void free_bar_config(struct bar_config *bar) { free(bar->colors.binding_mode_border); free(bar->colors.binding_mode_bg); free(bar->colors.binding_mode_text); +#if HAVE_TRAY + list_free_items_and_destroy(bar->tray_outputs); + free(bar->icon_theme); +#endif free(bar); } @@ -165,6 +170,10 @@ struct bar_config *default_bar_config(void) { bar->colors.binding_mode_bg = NULL; bar->colors.binding_mode_text = NULL; +#if HAVE_TRAY + bar->tray_padding = 2; +#endif + list_add(config->bars, bar); return bar; cleanup: -- cgit v1.2.3