So I’m trying to use FvwmButtons to control my music using mpd and mpc. Right now I’m just experimenting with it, but I would like my play button to alternate between a pause button and a play button each time it’s pressed. Here’s what the button’s config looks like now:
Well I just atemped copying what was in that thread and changing some lines so that it does what I want and here’s what I got: [code]DestroyFunc TogglePlay
AddToFunc TogglePlay
+I ThisWindow (State 1) Play
+I TestRc (NoMatch) Pause
Obviously this is wrong because it doesn’t work. And my music doesn’t play nor pause. Can anyone tell me what I’ve done wrong? Thanks in advance for your help.
Well I still haven’t gotten this to work, but I have found the mpc has a funtion to use the command mpc toggle to toggle playing or pause. But I still can’t get this working. Right now this is what I’ve got:
When I click the button to play or pause on my FvwmButtons dock, nothing happens at all. So I think there is something wrong with this part here: DestroyFunc TogglePlay
AddToFunc TogglePlay
+I ThisWindow (State 1) Play
+I TestRc (NoMatch) Pause
Do you get any output in ~/.xsession-errors , also can you specify an Icon like that, without passing it an explicit reference to the window it should be assigned to (eg Style $0 or something similar)?
You could of course always use Hun’s FvwmMpd-player which does basically the same thing
well there is not output to ~/.xession-errors. but if you can specify an icon like that, wouldn’t the button still function if everything else was right?
Go back to basics – using FvwmConsole, type out your “Play” and “Pause” functions into it, and call them from there. If they work from inside thaty, then that’s a start, although they probably won’t. Just as a thought, where you have:
+ I Exec exec mpc pause
try:
+ I Exec exec "mpc pause"
The quoting ought not to make a difference in this instance, but you never know.