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

issue #9 semi-fix
authorluke bonham <dadasignificanulla@gmail.com>
Fri, 1 Nov 2013 18:27:49 +0000 (19:27 +0100)
committercopycat-killer <dada@archlinux.info>
Wed, 5 Aug 2015 11:30:31 +0000 (13:30 +0200)
widgets/mpd.lua

index 58d9430c59d8d3938f810b2ffc30873c1e0253f4..4ee922ff57dc402d6cfb0b93c97390c3c5d77cdb 100644 (file)
@@ -42,6 +42,15 @@ local function worker(args)
 
     mpd.widget = wibox.widget.textbox('')
 
+    mpd_now = {
+        state  = "N/A",
+        file   = "N/A",
+        artist = "N/A",
+        title  = "N/A",
+        album  = "N/A",
+        date   = "N/A"
+    }
+
     mpd_notification_preset = {
         title   = "Now playing",
         timeout = 6
@@ -50,15 +59,6 @@ local function worker(args)
     helpers.set_map("current mpd track", nil)
 
     function mpd.update()
-        mpd_now = {
-            state  = "N/A",
-            file   = "N/A",
-            artist = "N/A",
-            title  = "N/A",
-            album  = "N/A",
-            date   = "N/A"
-        }
-
         local f = io.popen(echo .. " | curl --connect-timeout 1 -fsm 3 " .. mpdh)
 
         for line in f:lines() do