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 | Merge pull request #597 from wdbw/swaylock-pam-change (diff) | |
download | sway-11f0b4539d837b035c9f5c2cd41d64c0082f3551.tar.gz sway-11f0b4539d837b035c9f5c2cd41d64c0082f3551.tar.zst sway-11f0b4539d837b035c9f5c2cd41d64c0082f3551.zip |
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) { | |||
141 | } | 141 | } |
142 | 142 | ||
143 | if (markup) { | 143 | if (markup) { |
144 | new->markup = json_object_get_boolean(markup); | 144 | new->markup = false; |
145 | const char *markup_str = json_object_get_string(markup); | ||
146 | if (strcmp(markup_str, "pango") == 0) { | ||
147 | new->markup = true; | ||
148 | } | ||
145 | } | 149 | } |
146 | 150 | ||
147 | if (separator) { | 151 | if (separator) { |