wiki:plugin_mpd

Version 4 (modified by anonymous, 13 years ago) (diff)

--

MPd plugin

Under construction!

Doesn't work in RC1 with latest mpd. There exists no libmpd.h-file in current mpd-sources, which is required for this plugin.

checking which plugins to compile... done
checking libmpd/libmpd.h usability... no
checking libmpd/libmpd.h presence... no
checking for libmpd/libmpd.h... no
configure: WARNING: libmpd/libmpd.h header not found: mpd plugin disabled
foo@foo:/usr/src/mpd-0.12.2$ find . -name "libmpd.h"
foo@foo:/usr/src/mpd-0.12.2$ find . -name "lib*"
foo@foo:/usr/src/mpd-0.12.2$ find . -name "*mpd.h"
foo@foo:/usr/src/mpd-0.12.2$

Functions

mpd::artist()return artist of current song
mpd::title()return title or name of current song
mpd::album()return album of current song
mpd::playtime()return elapsed time of current song
mpd::totaltime()return total time of current song

Configuration example

Plugin Mpd {
 Host 'MPd-Server'
 Port 6600
}

Widget examples

Widget mpd-title {
    class  'Text'
    expression  mpd::title()
    width  20
    align  'C'
    update tack
}

Widget mpd-artist {
    class 'Text'
    expression mpd::artist()
    width 20
    align 'C'
    update tack
}

Widget mpd-album {
    class 'Text'
    expression mpd::album()
    width 20
    align 'C'
    update tack
}

Widget mpd-time {
    class 'Bar'
    expression mpd::playtime()
    length 20
    direction 'E'
    min 0
    max mpd::totaltime()
    update tack
}