commit 11f0b4539d837b035c9f5c2cd41d64c0082f3551
parent d8482419fca23f3f3d7a3ffa05f35444a3955238
Author: Mikkel Oscar Lyderik <mikkeloscar@gmail.com>
Date: Sun, 24 Apr 2016 10:23:03 +0200
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
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git 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) {