Subject: FVWM: SendToModule?

From: "Barry A. Warsaw" <[email-masked]>
Date: Wed, 1 May 1996 12:02:46 -0400

I was thinking about a framework where you could start a module up at
init time, have it hang around long lived, and have fvwm send it
command strings based on user configuration.  I'm sort of new to the
modules interface, but my take on it is that if you have a long lived
module, it will only ever get the initial arguments used when starting
the module.  From then on, there's no way a users configuration could
instruct fvwm to talk directly to the module -- it would only get the
events outlined in the module API document.

That's fine.  What I would do is add a new command to fvwm, that would
have the following interface:

    SendToModule <module> <string>

This would generate a new packet type and send it only to the module
in question.  Hmm, maybe there'd be a similar BroadcastToModules
command?  The packet would contain header, 'the usual window ids',
then the variable length string.

What I'm thinking about is a long lived Python helper module which
would react to these commands, updating its state, sending new
commands back to fvwm, importing Python modules as needed, etc.  I'm
not quite sure what I'd do with it, but I have a few modules now that
I use, and for one thing, I'd like to not have to fire up a Python
interpreter each time.  I could easily accomplish this with this type
of framework.

Any thoughts?
-Barry
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: <[email-masked]> (Charles Hines)
Date: Wed, 1 May 1996 12:50:01 -0400

>>>>> "BAW" == Barry A Warsaw <[email-masked]> writes:

BAW> I was thinking about a framework where you could start a module up at
BAW> init time, have it hang around long lived, and have fvwm send it
BAW> command strings based on user configuration.
....
BAW> That's fine.  What I would do is add a new command to fvwm, that would
BAW> have the following interface:

BAW>     SendToModule <module> <string>

BAW> This would generate a new packet type and send it only to the module
BAW> in question.
....

Boy Barry, I don't know...this is the second suggestion you've had
which is already on the TO-DO list...  ;^)

  - Add way to send arbitrary messages from fvwm to a module, eg
    'Send ModuleName "command string"' or something similar.

BAW> What I'm thinking about is a long lived Python helper module which
BAW> would react to these commands, updating its state, sending new
BAW> commands back to fvwm, importing Python modules as needed, etc.  I'm
BAW> not quite sure what I'd do with it, but I have a few modules now that
BAW> I use, and for one thing, I'd like to not have to fire up a Python
BAW> interpreter each time.  I could easily accomplish this with this type
BAW> of framework.

BAW> Any thoughts?

Only that I hope to actually get this in the next beta release since
it shouldn't be difficult to implement, and that I like your name for
it better than just the arbitrary 'Send' that I had written down
earlier.

Chuck

---

From: "Barry A. Warsaw" <[email-masked]>
Date: Wed, 1 May 1996 13:34:01 -0400

>>>>> "BAW" == Barry A Warsaw <[email-masked]> writes:

    ch> Boy Barry, I don't know...this is the second suggestion you've
    ch> had which is already on the TO-DO list...  ;^)

Okay, this time I *promise* to read through that file. :-)

    ch> Only that I hope to actually get this in the next beta release
    ch> since it shouldn't be difficult to implement, and that I like
    ch> your name for it better than just the arbitrary 'Send' that I
    ch> had written down earlier.

Cool!