FVWM-mpd

Like many others here, i wrote a little control for the musicplayerdaemon mpd.

What i was annoyed of was, that i couldn’t get the title of the song into it, so i wrote a small FvwmScript-Applet based on FvwmApplet-DigitalClock to do this: ClickMe

This is my first FvwmScript, so I request for comments (e.g. how to disable the flickering when using transparent colorsets).

EDIT: Screenshot

Have fun

Well, I think the easiest way by far to reduce the flickering is to only update the title when your songtitle changes, so you’d need to compare the current title with the new and call the ChangeTitle command based on that.

Well thanks for figuring this out for me, it was on my todo list for after the exams :wink:

[Offtopic]By the way: great music and nicely done theme[/Offtopic]

[EDIT]I didn’t feel like studying so this is what I came up with:

[code]WindowTitle {FvwmApplet-DigitalClock}
WindowSize 350 50 # Taille
Font xft:Snap:Size=8

Use the FvwmScript default colors.

#BackColor {rgb:a0/90/80}
#ForeColor {black}
#ShadowColor {black}
#HilightColor {rgb:a0/90/80}

Init
Begin
Set $MainColorset=(GetScriptArgument 1)
If $MainColorset <> {} Then
Begin
ChangeColorset 0 $MainColorset
ChangeColorset 1 $MainColorset
End
Set $tmp = (GetOutput {exec mpc} 1 -1)
ChangeTitle 1 $tmp
End

PeriodicTasks
Begin
If (RemainderOfDiv (GetTime) 3)==0 Then
Begin
Set $old = $tmp
Set $tmp = (GetOutput {exec mpc} 1 -1)
If $tmp==$old Then
Do Nop
Else
Begin
ChangeTitle 1 $tmp
End
End
End

Widget 1
Property
Position 0 0
Size 350 50
Type ItemDraw
Flags NoReliefString
Title {}
[/code]

Thanks :wink:

I knew you planned it, but I had some spare time and didn’t want to wait anymore :wink:

With your solution it works (didn’t know how comparisons work in FvwmScript, now i know)

Have Fun

I continued writing, here is a release completely in FvwmScript, so you don’t need FvwmButtons for the Controls

Usage:
FvwmScript FvwmMPD [COLORSET]

ClickMe

My codingstyle needs some improvements, but i think it’s readable and editable enough for most people here

Got a bit further this time…

Icons

Untar these and put them anywhere to your ImagePath.

New: Play/Pause toggling with iconchanging, support for amarok

MPD
Amarok

I’d do the same for XMMS, but it always segfaults when trying to run, so maybe somebody else could do it.

Screenshot
Have Fun

I have released a little FvwmScript mpd playlist editor, you can read about it here :slight_smile:

Hello, new here. Hun, this is a great script :slight_smile: The link for the icons is down. are they available anywhere else?

The link still works for me, if you keep on having problems I’ll mirror them :slight_smile:

[EDIT]Doh, of course they now work for me, Hun linked to my home box, which goes offline (nearly) each night, I’ll upload them on my hosting site later.
[EDIT2]If the above link doesn’t work you can get the icons here.

Great. Thanks theBlackDragon.

erm, how i can execute this script?.. (sry i’m newb) thanks!

All these mpd/amarok/etc. thingies puzzle me.
Why? GQmpeg. Enlight me, please.

UltraDiabos: Add FvwmScript PATH/TO/FvwmMPD COLORSET COLORSET COLORSET to your config

what these colorsets are is described in the README

btw: packed everything together in a single Package:

wurscht.menschenkatapult.org/FvwmMPD.tar.bz2

A new version has been released, see here, any following discussion about FvwmMpd should happen in that thread, so I’m locking this one :slight_smile: