On Sun, Jun 25, 2006 at 03:22:57AM +1000, Scott Smedley wrote: > > We may write a module FvwmButtonsUpdater that gets an FvwmButtons module > > name (alias) and a list of entries, each is: a button id, its update > > frequency and a shell command to invoke for title updates (for example, > > 'date +%T' or 'ps -A --format "%C %P %c" | sort -n -r | head -1'). > > > > Maybe someone will write such configurable module, useful for everybody. > > It is not very hard after reading "fvwm-perllib man". > > Why use a module for something so simple? > > AddToFunc MyPeriodicFunc > + I PipeRead 'echo SendToModule FvwmButtons ChangeButton clock Title $(date > +"%R %a %d.%m.")' > + I PipeRead 'str=$(/bin/ps -A --format "%C %P %c" | sort -n -r | tail -n1) ; > echo SendToModule FvwmButtons ChangeButton topproc Title "$str"' > + I Schedule 15000 MyPeriodicFunc > > Schedule 3000 MyPeriodicFunc > > The "topproc" calculation can be tidied up. This is just a proof-of-concept.
Two reasons: (1) "Schedule" is an unreliable hack and (2) this starts a shell every 15 seconds and my goal was to waste as little cpu as possible (as it interferes with certain time-critical applications - okay - games). Ciao Dominik ^_^ ^_^ -- Dominik Vogt, [EMAIL PROTECTED]
signature.asc
Description: Digital signature