On 17/08/2014 12:37, Dominik Vogt wrote:
By the way, I've been using the module interface for a similar
task. One of the buttons in FvwmButtons displays the time and
date, another one current memory usage and a third one the top
cpu using process. This is updated every fifteen seconds.
Because I don't like processes (FvwmCommand) to be started all the
time I wrote the ModuleListenOnly fvwm command and implemented the
module as a zsh script (attached). Note that the module interface
uses the "long" C type, and the script is written for systems
where sizeof(long) is four. It needs to be adapted of eight byte
longs, i.e. 64-bit systems.
The command to start the script is
+ I ModuleListenOnly fvwm_periodic -u 15 -d 3 -c clock -t topproc -M mempct
in the InitFunction and the RestartFunction. The ModuleListenOnly
allows to write one way modules. They can send packets to fvwm,
but fvwm does not send them any packets.
Ciao
Dominik ^_^ ^_^
Having thought a little more about what i'm trying to have displayed in
this particular button, I thought I should ask about an idea that
occurred to me this morning:
How about using xclock with the -strftime command line option to print
the current day and month in the button. It would be the 2nd instance of
xclock running in that fvwmbuttons though, which shouldn't be an issue?