for quite a while now I’m fumbling trying to get a working fvwm module written either as a shell or an awk script, but I never
really managed to get to the point where the module would be able to send commands to fvwm.
With the shell script I always get an error complaining about the sent string being to big.
With awk I even do not come to that point as I have no idea howto write to a file descriptor.
In one of the topics I read about a module written as a shell script but I didn’t find any source code. It seems to be vanished…
The background is that my fvwm runs on a Zaurus and I try to avoid installing perl in order to save precious disk space.
On the other hand I would like to handle key bindings without the Exec command as it costs too much time to open
a shell each time you want to adjust the volume for mplayer.
Maybe one of you fvwm (or shell or awk) experts can help me by giving me some hints?
There was an unfinished attempt by someone to write sh bindings to talk to FVWM.
Redirection.
Maybe you can tell us what it is you’re really trying to do – it could simply be running an external script using FvwmCommand or just PipeRead suffices, rather than shooting yourself.
The reasons I try to do this is that a Piperead or Exec would start a shell that e.g. would itself start an xmmsctrl command.
Increasing the volume that way wouldn’t be very responsive as the Zaurus is simply too slow for that. So I thought of using
the xmms-pipe plugin with an fvwm-module that translates and passes the commands directly to the plugin. Same idea
with mplayer in slave-mode.
And, of course, I have kind of a sportive interest in just seeing if it is possible.
Doesn’t running a bash or awk script use the same resources for opening a shell as pipeexec? I tried it anyway
to see if it would work.
You have the module protocol slightly wrong. A message to fvwm is:
4 bytes for the window id
4 bytes for the message length
the message as an ascii string
4 bytes for continue (1 or 0)
With echo, the numbers have to be sent as binary by converting them to octal escape sequences. Also
echo adds a newline by default, which will affect the data.
I have a crontab tcsh script which uses FvwmCommand, and another one which is called periodically by an FvwmScript invoked by the .fvwmrc (this pings a few local hosts and sets the colour of a little widget as green or red whether they respond or not). I have also another one called by a single PipeRead from .fvwmrc