Does the following snippet produce any notifications? Be careful, i
have currently no chance to test the code.
mpdwidget = widget({ type = 'textbox' })
       vicious.register(mpdwidget, vicious.widgets.mpd,
            function (widget, args)
               local msg = string.format("state: %s Title: %s",
args["{state}"], args["{Title}"])
               -- uncomment this if you don't see any notifications.
               -- if next(args) == nil then msg= "args is empty!"
               naughty.notify{ text=msg }
            end)

2011/6/1 stardiviner <[email protected]>:
> It's weird, well, I upgrade my ubuntu system , now Awesome version is:
> v3.4.9 ( Smack )
> I git cloned newest vicious lua lib, other widget regestered with vicious can 
> work good, except mpdwidget.
>
> awesome syntax check gets through.
>
> belowing is a clip of my mpdwidget:
> -- MPD widget
> mpdwidget = widget({ type = 'textbox' })
>        vicious.register(mpdwidget, vicious.widgets.mpd,
>                function (widget, args)
>                        if args["{state}"] == "Stop" then
>                                return ""
>                        elseif args["{state}"] == "Play" then
>                                return "" .. colbblu .. "-> " .. coldef .. 
> colbred .. args["{Title}"] .. " - " .. args["{Artist}"] .. coldef .. ""
>                        elseif args["{state}"] == "Pause" then
>                                return "" .. colbblk .. "mpd : " .. coldef .. 
> colbblk .. "Paused" .. coldef .. ""
>                        end
>        end)
> --      mpdwidget:buttons(
> --              awful.util.table.join(
> --                      awful.button({}, 1, function () awful.util.spawn("mpc 
> toggle", false) end), -- here false can avoid cursor switch busy mode
> --                      awful.button({}, 2, function () awful.util.spawn( 
> terminal .. " -e ncmpcpp")   end),
> --                      awful.button({}, 4, function () awful.util.spawn("mpc 
> prev", false) end),
> --                      awful.button({}, 5, function () awful.util.spawn("mpc 
> next", false) end)
> --              )
> --      )
>
> --
> [ *chris* ]
> I am a stardiviner ( divine star ) :P ,
> I try to detoxify my memory.
> Forgotten is not a disappointment.
> Give me a hug for my life.
>
> --
> To unsubscribe, send mail to [email protected].
>



-- 
Gruß Jörg

--
To unsubscribe, send mail to [email protected].

Reply via email to