Subject: FVWM: KillModule question.

From: "Patrick K." <[email-masked]>
Date: Thu, 30 Jul 1998 14:12:00 -0400 (EDT)

Hello all,

   I've been looking at KillModule command for a couple of days now,
   without being able to have it do what I thought its purpose is.

   What do I want to do?

   Well ... say I spawn two FvwmButtons modules: fb1 fb2.
   Now say I want to kill fb2 *only* and leave fb1 "alive".

   How can this be accomplished without having to write
   a function which would kill both and then restart fb1?

   Any hints, ideas?

Patrick ...
--
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: Dan Espen <[email-masked]>
Date: Thu, 30 Jul 1998 14:51:37 -0400

>    a function which would kill both and then restart fb1?

I believe this will show up on the next TODO list.
At this time there doesn't seem to be any way to do this
other than changing the source code.

--
Dan Espen                                Phone: (732) 699-5570
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854
--
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] (Jim Bianchi)
Date: 30 Jul 1998 20:48:10 GMT

>   a function which would kill both and then restart fb1?

	Hmmm, mayhaps I'm doing something worng, but I've modified my
FvwmButtons module definition so that it is possible for me to have more
than one functioning buttonbar on screen at the same time (not that I do
this -- it is just possible). Now in my testing of the new buttonbar layout,
I often DID end up with both on screen simultaneously. To get rid of one or
the other (or both), I've just used the buttonbar 'kill' command -- clicked
on it on one of the buttonbars, the cursor would change shape, and then I'd
click again on any part of the offending buttonbar and whoof! it'd be gone.
(Alternatively the kill cmd found in the popup menu would do as well.) I'm
not familiar with the KillModule cmd.

-- 
[email-masked] 
Eclectic Garbanzo BBS, (707) 539-1279

---

From: "Patrick K." <[email-masked]>
Date: Thu, 30 Jul 1998 17:29:13 -0700 (PDT)

> >   a function which would kill both and then restart fb1?

jimbo>>
> not familiar with the KillModule cmd.
<<jimbo

   Well .. yes.  This does work.  But I want to be able to
   do this more dynamically.

   Picture this:
   I have a standard FvwmButtons module called fb1.  On this
   button set I have one button named "Servers" with a server
   icon on there.
   
   Clicking on this button will spawn a new FvwmButtons
   module named "fbServers" which will contain icons for
   each of our development servers and one button named
   "Close", or a button containing a "back arrow" icon.

   Clicking on the "back arrow" or "Close" button would
   kill that particular instance of the FvwmButtons module
   named "fbServers".

   In effect it would look like a sliding drawer of sort.

   See my point?

Patrick ...

   Pictures:

     ( fb1 module )

      +---------+
      |         |
      | Restart |                   ( fbServers module )
      |         |
      +---------+           +-----+---------+---------{  . . .  }--------+
      |         |           |     |         |          }       {         |
      | Servers <-*click*   | <== |  jazz   |  mars   {         } riffer |
      |         |           |     |         |          }       {         |
      +---------+    |      +-----+---------+---------{  . . .  }--------+
      |         |    |                  ^
      |  Xterm  |    |                  |
      |         |    +--> creates this -+
     ~~~~~~~~~~~~~               module
      .         .
      .         .
      .         .

     ~~~~~~~~~~~~~
      | Shutdown|
      |         |
      +---------+

     ( fb1 module )

      +---------+
      |         |
      | Restart |                   ( fbServers module )
      |         |
      +---------+           +-----+---------+---------{  . . .  }--------+
      |         |           |     |         |          }       {         |
      | Servers |           | <== |  jazz   |  mars   {         } riffer |
      |         | *click* -->     |         |          }       {         |
      +---------+    |      +-----+---------+---------{  . . .  }--------+
      |         |    |                  ^
      |  Xterm  |    |                  |
      |         |    +-->  kills  this -+
     ~~~~~~~~~~~~~               module
      .         .
      .         .
      .         .

     ~~~~~~~~~~~~~
      | Shutdown|
      |         |
      +---------+

---

From: LAURENT DEGEILH <[email-masked]>
Date: Fri, 31 Jul 1998 09:12:41 +0200 (METDST)

Le 30 Jul, Patrick K. a ecrit:

-> ...
->    Well .. yes.  This does work.  But I want to be able to
->    do this more dynamically.
-> 
->    Picture this:
->    I have a standard FvwmButtons module called fb1.  On this
->    button set I have one button named "Servers" with a server
->    icon on there.
->    
->    Clicking on this button will spawn a new FvwmButtons
->    module named "fbServers" which will contain icons for
->    each of our development servers and one button named
->    "Close", or a button containing a "back arrow" icon.
-> 
->    Clicking on the "back arrow" or "Close" button would
->    kill that particular instance of the FvwmButtons module
->    named "fbServers".
-> 
->    In effect it would look like a sliding drawer of sort.
-> 
->    See my point?
-> 

look at 

http://www.giccs.georgetown.edu/~ric/software/fvwm/wharf

HTH,

_____________________ dgh ___________________________

---

From: Tim Phipps <[email-masked]>
Date: Fri, 31 Jul 1998 09:05:53 +0100

Patrick K. wrote:
...
>    In effect it would look like a sliding drawer of sort.

If you really do want to kill the fbServers module you could kill the
window rather than the module (Next [fbServers] Close).

But what you are describing sounds just like a subpanel in HP-VUE and
CDE. Have a look at FvwmCDE (can't remeber the URL, try the mailing list
archives).  If that can't do it you can fake it with two FvwmButtons as
you describe but there is no need to kill and restart the sliding
drawer, instead you could just iconify it and set style options so that
the icon doesn't appear. e.g.

Style fbServers Sticky, CirculateSkip, CirculateIconSkip, \
StaysOnTop, NoIcon, StartIconic

and a function like the following called from the button in fb1

AddToFunc Servers "I" Echo "Doing Servers"
+ "I" None [fbServers CirculateHit CirculateHitIcon] FvwmButtons
fbServers
+ "I" None [fbServers CirculateHit CirculateHitIcon] Wait fbServers
+ "I" Next [fbServers CirculateHit CirculateHitIcon] Iconify

This is from memory of a function I used to use when I was a sysadmin so
it may need tweaking 8-). It won't do the funky sliding in and out that
CDE does but that could be done by replacing the Iconify with a function
that tests for the existence of an iconified fbServers and branches to
do either (raise fb1, raise fbServers, deiconify fbServers, AnimatedMove
fbServers out) or (raise fb1, AnimatedMove fbServers in, iconify
fbServers) but you'll need fvwm2.0.46 with the AnimatedMove patch or
2.0.47

Cheers,
Tim.

---

From: "Patrick K." <[email-masked]>
Date: Fri, 31 Jul 1998 19:10:19 +1700 (PDT)

> http://www.giccs.georgetown.edu/~ric/software/fvwm/wharf

   Yes, it was mentioned that I was describing the FvwmWharf
   behavior by another reader.

   Two reasons I do not want to go that route:

      1. Too lazy to learn new syntax for the Wharf module
         and get it to look and feel like my FvwmButtons
         module.

      2. The KillModule command description I origionally
         gave was a generic one and the FvwmButtons example
         was just that; and example.

         One could extend the use of such a module to kill
         particular instances of *any* module.

   Note that I am not trying to be deficult and/or trying
   to push idea of development of such a command.  I was
   simply pondering if there was an elegant way for me to
   do what I wanted to do.

   A few work.arounds were suggested with:
   
      `ps blah | grep blah | cut blah | kill blah'

   command....which would obviously work fine, though
   carry with it quite a bit of overhead (execv processes
   and pipe stuff to one another, etc etc).

   Thanks all for their informative replies!
   I appreciate every comment I received!  :)

Patrick ...