Subject: FVWM: detect running modules

From: Scott Smedley <[email-masked]>
Date: Sat, 17 Jul 2004 12:51:11 +1000

Hi all,

I'd like to be able to determine if a module is already loaded. Is there
a way to do this?

I'd like to be able to do something like:

AddToFunc ToggleFvwmProxy
+ I Test (!ModuleRunning FvwmProxy) ModuleSynchronous FvwmProxy
+ I SendToModule FvwmProxy ShowToggle

Key F11 A A Function ToggleFvwmProxy

This way, the module gets loaded the first time I press F11.
(which I might not do during most sessions - hence the desire for
a kind of "autoload" feature.)

SCoTT. :)
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Scott Smedley <[email-masked]>
Date: Sat, 17 Jul 2004 19:50:01 +1000

Hi Rusty,

> How about using a nice piperead and some standard Posix programs?
> 
> Here's an example of one such statement (i.e. just stick this in a
> piperead):
> ps -A | grep FvwmProxy >/dev/null && echo "ModuleSynchronous FvwmProxy \
> || echo "Nop"

A good idea.

However, I'd also like to know if a named instance of a module is
running.

ie. I start multiple instances of the FvwmButtons module.
eg. Module FvwmButtons Buttonbar

So I'd need to use "ps -A -f", but then the grep would probably
match on itself so I should use the "pidof" program, but then I want
to make sure it's _my_ FvwmProxy running (not someone elses) so I
probably need to combine pidof with ps.

I don't think using pidof is portable though.

Hmmm, why do PipeRead's always get so complicated!? :)

SCoTT. :)

---

From: Florian Diesch <[email-masked]>
Date: Tue, 27 Jul 2004 16:34:37 +0200

> match on itself so I should use the "pidof" program, but then I want

Use  something like
 grep [F]vwmProxy
to avoid grep matching itself

-- 
 Schönen Tag noch   
     Florian        # http://www.informatik.uni-freiburg.de/~diesch/
 --------------------------------------------------------------------------
   **  Hi! I'm a signature virus! Copy me into your signature, please!  **

---

From: Julian Leyh <[email-masked]>
Date: Tue, 27 Jul 2004 19:43:24 +0200

(sorry florian.. should be sent to the list..)

> to avoid grep matching itself

or grep -v grep :)

cu
JRL

-- 
visit my OpenBSD ports page: http://vgai.de/ports
--
If you don't remember something, it never existed...
If you aren't remembered, you never existed...
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].