From: Chris Bruce Date: Sat, 10 Dec 2016 22:02:50 +0000 (-0800) Subject: Add track and genre to mpd_now X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/1363e10b307f468da749aa1e08ab57b3f4e7b913?hp=-c Add track and genre to mpd_now --- 1363e10b307f468da749aa1e08ab57b3f4e7b913 diff --git a/widgets/mpd.lua b/widgets/mpd.lua index 8568764..24cdcda 100644 --- a/widgets/mpd.lua +++ b/widgets/mpd.lua @@ -70,6 +70,8 @@ local function worker(args) artist = "N/A", title = "N/A", album = "N/A", + genre = "N/A", + track = "N/A", date = "N/A", time = "N/A", elapsed = "N/A" @@ -83,6 +85,8 @@ local function worker(args) elseif k == "Artist" then mpd_now.artist = escape_f(v) elseif k == "Title" then mpd_now.title = escape_f(v) elseif k == "Album" then mpd_now.album = escape_f(v) + elseif k == "Genre" then mpd_now.genre = escape_f(v) + elseif k == "Track" then mpd_now.track = escape_f(v) elseif k == "Date" then mpd_now.date = escape_f(v) elseif k == "Time" then mpd_now.time = v elseif k == "elapsed" then mpd_now.elapsed = string.match(v, "%d+")