On Sun, Aug 17, 2014 at 11:11:42AM +0100, Jamie Griffin wrote: > Within my dock (FvwmButtons) I would like to have the day (number) and the > three letter abbreviation of the current date shown in-place of an icon > inside one of my buttons, sort-of like a simple calendar display. I believe > I can achieve this with PipeRead and echo but as I'm still learning about > the scripting part of fvwm I can't quite get it to do what I want.
You need to use the SendToModule command with the 'ChangeButton' directive to do this. So first step is to give your button some identifier: *Foo: (1x1, Id MyButton, Title "Hello...") Then from that you can do: SendToModule Foo ChangeButton Id MyButton Title "Something different..." Note that I wouldn't suggest you use PipeRead at all for this as you'll block fvwm completely. You could spawn a separate script and use FvwmCommand to do this instead. AddToFunc StartFunction I Module FvwmCommandS AddToFunc StartFunction I Module FvwmButtons Foo AddToFunc StartFunction I Exec exec ~/bin/my_date_script.sh ~/bin/my_update_script.sh might look something like this: #!/bin/sh while :; do text="$(date +'...')" FvwmCommand "SendToModule Foo ChangeButton MyButton Title $text" sleep 1 done -- Thomas Adam -- "Deep in my heart I wish I was wrong. But deep in my heart I know I am not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)