You are not logged in.

#1 2013-05-14 14:46:33

Valvar
Member
Registered: 2012-11-01
Posts: 15

[SOLVED] Can't get vicious MPD widget to display properly

Hi,

I've been messing around with my rc.lua for hours now, but I just can't get a working MPD widget. When using the Vicious MPD widget I simply get N/A for every field:  x1KAOgr.png
I don't really understand lua (or at least I can't decode the mpd.lua with my weak mind), so I haven't been able to wrap my mind around why this happens.
I have looked at other people's dotfiles and it looks like their widget sections of rc.lua and mpd.lua are IDENTICAL. So I guess it might be an issue with my mpd configuration?

This is the widget code that I am using in my rc.lua:

-- Initialize widget
mpdwidget = wibox.widget.textbox()
-- Register widget
vicious.register(mpdwidget, vicious.widgets.mpd,
    function (mpdwidget, args)
        if args["{state}"] == "Stop" then 
            return " - "
        else 
            return args["{Artist}"]..' - '.. args["{Title}"]
        end
    end, 10)

Any help would be greatly appreciated!

Last edited by Valvar (2013-05-14 16:19:43)

Offline

#2 2013-05-14 14:56:04

Lordii
Member
Registered: 2013-01-16
Posts: 20

Re: [SOLVED] Can't get vicious MPD widget to display properly

the host and port of mpd are the defaults?

Offline

#3 2013-05-14 15:00:57

Valvar
Member
Registered: 2012-11-01
Posts: 15

Re: [SOLVED] Can't get vicious MPD widget to display properly

Yup.

Here is my mpd.conf: http://codepad.org/DFYrCllQ

Nothing much changed except for directories and output set to pulse.

Last edited by Valvar (2013-05-14 15:05:49)

Offline

#4 2013-05-14 16:20:23

Valvar
Member
Registered: 2012-11-01
Posts: 15

Re: [SOLVED] Can't get vicious MPD widget to display properly

Solved it by changing the name of the statefile from "state" to "mpdstate" in mpd.conf.

Offline

Board footer

Powered by FluxBB