]> git.madduck.net Git - etc/awesome.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Add track and genre to mpd_now
authorChris Bruce <aprofessionalemailaddress@gmail.com>
Sat, 10 Dec 2016 22:02:50 +0000 (14:02 -0800)
committerChris Bruce <aprofessionalemailaddress@gmail.com>
Sat, 10 Dec 2016 22:05:39 +0000 (14:05 -0800)
widgets/mpd.lua

index 8568764aeeaa69089f15cf1c5656783e1c08c493..24cdcda86eb94017f6759fa6fd941f2355652080 100644 (file)
@@ -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+")