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

mpd: added http streams check; #115
authorLuke Bonham <dada@archlinux.info>
Sun, 12 Jul 2015 09:51:58 +0000 (11:51 +0200)
committercopycat-killer <dada@archlinux.info>
Wed, 5 Aug 2015 11:31:15 +0000 (13:31 +0200)
widgets/mpd.lua
wiki

index c10eb7804f77130ec9796cb8062f72e75961448f..6b66f8138f06a2d49395e06602933185adb3ef6f 100644 (file)
@@ -89,12 +89,18 @@ local function worker(args)
                 then
                     helpers.set_map("current mpd track", mpd_now.title)
 
-                    os.execute(string.format("%s %q %q %d %q", mpdcover, music_dir,
-                               mpd_now.file, cover_size, default_art))
+                    if string.match(mpd_now.file, "http://") == nil
+                    then -- local file
+                        os.execute(string.format("%s %q %q %d %q", mpdcover, music_dir,
+                                   mpd_now.file, cover_size, default_art))
+                        current_icon = "/tmp/mpdcover.png"
+                    else -- http stream
+                        current_icon = default_art
+                    end
 
                     mpd.id = naughty.notify({
                         preset = mpd_notification_preset,
-                        icon = "/tmp/mpdcover.png",
+                        icon = current_icon,
                         replaces_id = mpd.id,
                     }).id
                 end
diff --git a/wiki b/wiki
index 54b3a717b2f7069264ce5a20018ae4abf153e7b2..4021f24b33be60d2e6b4050098bd8da131648a7e 160000 (submodule)
--- a/wiki
+++ b/wiki
@@ -1 +1 @@
-Subproject commit 54b3a717b2f7069264ce5a20018ae4abf153e7b2
+Subproject commit 4021f24b33be60d2e6b4050098bd8da131648a7e