]> git.rmz.io Git - dotfiles.git/commitdiff
awesome/mpd_widget: add defalut album art if none available
authorSamir Benmendil <me@rmz.io>
Mon, 10 Aug 2020 21:55:48 +0000 (22:55 +0100)
committerSamir Benmendil <me@rmz.io>
Mon, 10 Aug 2020 21:56:22 +0000 (22:56 +0100)
awesome/themes/mlp/mpd_default_album.license [new file with mode: 0644]
awesome/themes/mlp/mpd_default_album.png [new file with mode: 0644]
awesome/themes/mlp/theme.lua
awesome/widgets/mpd_widget.lua

diff --git a/awesome/themes/mlp/mpd_default_album.license b/awesome/themes/mlp/mpd_default_album.license
new file mode 100644 (file)
index 0000000..0f652ee
--- /dev/null
@@ -0,0 +1,2 @@
+Fyrsten / CC BY-SA (https://creativecommons.org/licenses/by-sa/3.0)
+https://commons.wikimedia.org/wiki/File:LP_vinyl3.png
diff --git a/awesome/themes/mlp/mpd_default_album.png b/awesome/themes/mlp/mpd_default_album.png
new file mode 100644 (file)
index 0000000..65de96c
Binary files /dev/null and b/awesome/themes/mlp/mpd_default_album.png differ
index 90f57639be8eaec161fa2e954e000bf30f617a46..3d83e8f77711a2537747dc9e8d7b7ac30d916e34 100644 (file)
@@ -95,6 +95,8 @@ theme.layout_cornerse   = theme.path.."/layouts/cornersew.png"
 
 theme.awesome_icon = "/usr/share/awesome/icons/awesome16.png"
 
+theme.mpd_default_album = theme.path.."/mpd_default_album.png"
+
 -- Define the icon theme for application icons. If not set then the icons
 -- from /usr/share/icons and /usr/share/icons/hicolor will be used.
 theme.icon_theme = nil
index 8e962c671cf342a107a926c963daa41ddf93d7fb..e71e0873787dbcce971f75c498e52337726fd477 100644 (file)
@@ -79,7 +79,7 @@ function widget:popup_show()
         if self._notification then return end
         self._notification = naughty.notify(
             { title = table.title
-            , icon = table.icon
+            , icon = table.icon or beautiful.mpd_default_album
             , icon_size = 64
             , text = table.text
             , timeout = 0