From 11f0b4539d837b035c9f5c2cd41d64c0082f3551 Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Date: Sun, 24 Apr 2016 10:23:03 +0200 Subject: [PATCH] Use i3bar format for markup field. In the i3bar protocol the value of the markup field is a string: "pango" or "none" rather than a bool. This patch makes swaybar compatible with that. http://i3wm.org/docs/i3bar-protocol.html --- swaybar/status_line.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/swaybar/status_line.c b/swaybar/status_line.c index 63db702fd..49a8363a3 100644 --- a/swaybar/status_line.c +++ b/swaybar/status_line.c @@ -141,7 +141,11 @@ static void parse_json(struct bar *bar, const char *text) { } if (markup) { - new->markup = json_object_get_boolean(markup); + new->markup = false; + const char *markup_str = json_object_get_string(markup); + if (strcmp(markup_str, "pango") == 0) { + new->markup = true; + } } if (separator) {