From 1aeb5b86bb433823cabbf907f69bc87c313888ac Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Tue, 18 Oct 2016 23:41:29 +0200
Subject: dwmstatus: show the song name even when paused
---
dwmstatus.c | 12 +++++++-----
1 file 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")))
--
cgit v1.2.3-70-g09d2