dwmstatus: show the song name even when paused
This commit is contained in:
parent
95ffaf3bd9
commit
1aeb5b86bb
12
dwmstatus.c
12
dwmstatus.c
|
@ -1368,18 +1368,20 @@ mpd_on_info_response (const struct mpd_response *response,
|
||||||
free (ctx->mpd_status);
|
free (ctx->mpd_status);
|
||||||
ctx->mpd_status = NULL;
|
ctx->mpd_status = NULL;
|
||||||
|
|
||||||
|
struct str s;
|
||||||
|
str_init (&s);
|
||||||
|
|
||||||
const char *value;
|
const char *value;
|
||||||
if ((value = str_map_find (&map, "state")))
|
if ((value = str_map_find (&map, "state")))
|
||||||
{
|
{
|
||||||
if (!strcmp (value, "stop"))
|
if (!strcmp (value, "stop"))
|
||||||
ctx->mpd_status = xstrdup ("MPD stopped");
|
ctx->mpd_status = xstrdup ("MPD stopped");
|
||||||
if (!strcmp (value, "pause"))
|
else if (!strcmp (value, "pause"))
|
||||||
ctx->mpd_status = xstrdup ("MPD paused");
|
str_append (&s, "|| ");
|
||||||
|
else
|
||||||
|
str_append (&s, "|> ");
|
||||||
}
|
}
|
||||||
|
|
||||||
struct str s;
|
|
||||||
str_init (&s);
|
|
||||||
|
|
||||||
if ((value = str_map_find (&map, "title"))
|
if ((value = str_map_find (&map, "title"))
|
||||||
|| (value = str_map_find (&map, "name"))
|
|| (value = str_map_find (&map, "name"))
|
||||||
|| (value = str_map_find (&map, "file")))
|
|| (value = str_map_find (&map, "file")))
|
||||||
|
|
Loading…
Reference in New Issue