aboutsummaryrefslogtreecommitdiff
path: root/sway/config/bar.c
diff options
context:
space:
mode:
authorIan Fan <ianfan0@gmail.com>2018-12-09 15:10:41 +0000
committerIan Fan <ianfan0@gmail.com>2018-12-31 20:40:18 +0000
commit6b03c68775c9c638def342c82b1fa3beffa52645 (patch)
treea3b18d948f8e2a51151f24aab47c552f28a17f70 /sway/config/bar.c
parent74655f835aa9fe0e976473d443f62d253602696c (diff)
swaybar: implement tray config
Diffstat (limited to 'sway/config/bar.c')
-rw-r--r--sway/config/bar.c9
1 files changed, 9 insertions, 0 deletions
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 <signal.h>
#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: