aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dwmstatus.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/dwmstatus.c b/dwmstatus.c
index da2b78f..c19fda5 100644
--- a/dwmstatus.c
+++ b/dwmstatus.c
@@ -1368,18 +1368,20 @@ mpd_on_info_response (const struct mpd_response *response,
free (ctx->mpd_status);
ctx->mpd_status = NULL;
+ struct str s;
+ str_init (&s);
+
const char *value;
if ((value = str_map_find (&map, "state")))
{
if (!strcmp (value, "stop"))
ctx->mpd_status = xstrdup ("MPD stopped");
- if (!strcmp (value, "pause"))
- ctx->mpd_status = xstrdup ("MPD paused");
+ else if (!strcmp (value, "pause"))
+ str_append (&s, "|| ");
+ else
+ str_append (&s, "|> ");
}
- struct str s;
- str_init (&s);
-
if ((value = str_map_find (&map, "title"))
|| (value = str_map_find (&map, "name"))
|| (value = str_map_find (&map, "file")))