]> 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:

Added keys to mpd_now for querying the length of a song and the current time (both...
authorJack Pugmire <jep@openmailbox.com>
Fri, 16 Jan 2015 04:44:22 +0000 (23:44 -0500)
committerJack Pugmire <jep@openmailbox.com>
Fri, 16 Jan 2015 04:44:22 +0000 (23:44 -0500)
widgets/mpd.lua

index 7fd611d71fb7c80782d55aa4f0aa7d6d3b8955e0..99624a22e6b03059e026c17a5dbe75f16cd541dd 100644 (file)
@@ -58,7 +58,9 @@ local function worker(args)
                 artist = "N/A",
                 title  = "N/A",
                 album  = "N/A",
-                date   = "N/A"
+                date   = "N/A",
+                time   = "N/A",
+                elapsed= "N/A"
             }
 
             for line in f:lines() do
@@ -69,6 +71,8 @@ local function worker(args)
                     elseif k == "Title"  then mpd_now.title  = escape_f(v)
                     elseif k == "Album"  then mpd_now.album  = 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= math.floor(v)
                     end
                 end
             end