Set `MPD is not running` in mpdarc-widget current song when MPD is not running.

This commit is contained in:
Hasan Ramezani 2018-11-06 21:42:27 +01:00
parent a89e2fe76a
commit 944c00201a
No known key found for this signature in database
GPG Key ID: D0E2D7CE14B68267
1 changed files with 6 additions and 2 deletions

View File

@ -70,8 +70,12 @@ local update_graphic = function(widget, stdout, _, _, _)
mpdarc_current_song_widget.markup = current_song
else
icon.image = STOP_ICON_NAME
widget.colors = { beautiful.widget_red }
mpdarc_current_song_widget.markup = ""
if string.len(stdout) == 0 then -- MPD is not running
mpdarc_current_song_widget.markup = "MPD is not running"
else
widget.colors = { beautiful.widget_red }
mpdarc_current_song_widget.markup = ""
end
end
end