diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-04-24 10:23:03 +0200 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-04-24 10:26:55 +0200 |
commit | 11f0b4539d837b035c9f5c2cd41d64c0082f3551 (patch) | |
tree | 15d8086aba7efc1eb4c077455cd04bda3a379425 /swaybar | |
parent | d8482419fca23f3f3d7a3ffa05f35444a3955238 (diff) | |
download | sway-11f0b4539d837b035c9f5c2cd41d64c0082f3551.tar.xz |
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 (limited to 'swaybar')
-rw-r--r-- | swaybar/status_line.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/swaybar/status_line.c b/swaybar/status_line.c index 63db702f..49a8363a 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) { |