From febad9fe9fb8de6c40e003ed3c758be2ed8d8707 Mon Sep 17 00:00:00 2001 From: elenapan Date: Mon, 20 Apr 2020 15:40:36 +0300 Subject: [PATCH] Fix evil mpd daemon fallback values Now they will never be empty --- config/awesome/evil/mpd.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/awesome/evil/mpd.lua b/config/awesome/evil/mpd.lua index f10b1d3..f5eff15 100644 --- a/config/awesome/evil/mpd.lua +++ b/config/awesome/evil/mpd.lua @@ -17,11 +17,14 @@ local function emit_info() local title = stdout:match('@TITLE@(.*)@FILE') local status = stdout:match('\n%[(.*)%]') - if artist == "" then + if not artist or artist == "" then artist = "N/A" end - if title == "" then + if not title or title == "" then title = stdout:match('@FILE@(.*)@') + if not title or title == "" then + title = "N/A" + end end local paused