1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-23 03:32:30 +00:00

holo: mpd & fix

This commit is contained in:
luke bonham 2013-09-16 13:33:56 +02:00
parent d1c73522c6
commit 5108ca3bd5

View file

@ -172,13 +172,12 @@ play_pause_icon:set_image(beautiful.play)
mpdwidget = lain.widgets.mpd({ mpdwidget = lain.widgets.mpd({
settings = function () settings = function ()
if mpd_now.state == "play" then if mpd_now.state == "play" then
mpd_now.artist = mpd_now.artist:gsub('"', '"'):upper()
mpd_now.title = mpd_now.title:gsub('"', '"'):upper()
widget:set_markup(markup.font("Tamsyn 4", " ") widget:set_markup(markup.font("Tamsyn 4", " ")
.. markup.font("Tamsyn 8", mpd_now.artist .. .. markup.font("Tamsyn 8",
" - " .. mpd_now.artist:upper():gsub("&", "&")
mpd_now.title) .. " - " ..
.. markup.font("Tamsyn 10", " ")) mpd_now.title:upper():gsub("&", "&")
.. markup.font("Tamsyn 10", " ")))
play_pause_icon:set_image(beautiful.pause) play_pause_icon:set_image(beautiful.pause)
elseif mpd_now.state == "pause" then elseif mpd_now.state == "pause" then
widget:set_markup(markup.font("Tamsyn 4", " ") .. widget:set_markup(markup.font("Tamsyn 4", " ") ..
@ -186,7 +185,7 @@ mpdwidget = lain.widgets.mpd({
markup.font("Tamsyn 10", " ")) markup.font("Tamsyn 10", " "))
play_pause_icon:set_image(beautiful.play) play_pause_icon:set_image(beautiful.play)
else else
widget:set_text("") widget:set_markup("")
play_pause_icon:set_image(beautiful.play) play_pause_icon:set_image(beautiful.play)
end end
end end