Subject: FVWM: commands to modules

From: [email-masked] (Chad Coulliette)
Date: Thu, 30 Nov 1995 12:41:33 -0800 (PST)

Hello Everyone,

Is there a way to pass a command directly to a module from a menu? 
For example, is something like this possible:

AddToMenu Backgrounds "Backgrounds" Title
...
+      "background4"      *FvwmBackerDesk 4 xpmroot /usr/local/X11R6/include/X11/pixmaps/background4.xpm
...

Would it be necessary to call Module FvwmBack afterward?  Maybe FvwmForm 
could be used instead?  Any advice here would be great.

Thanks,

Chad
--
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] (Todd Fries)
Date: Thu, 30 Nov 1995 15:22:39 -0600 (CST)

> Is there a way to pass a command directly to a module from a menu? 

not directly.  One way I see of doing what you want is try using a combo
of a 'read' command and a function:

AddToMenu Backgrounds "Backgrounds" Title
+      "background1%background1.xpm%"      Function bg1
+      "background2%background2.xpm%"      Function bg2
+      "background3%backgorund3.xpm%"      Function bg3
+      "background4%background4.xpm%"      Function bg4
AddToFunc bg1 "I" Read /home/whoever/.fvwm/fvwm-bg1
+ "I" FvwmBack
AddToFunc bg1 "I" Read /home/whoever/.fvwm/fvwm-bg2
+ "I" FvwmBack
AddToFunc bg1 "I" Read /home/whoever/.fvwm/fvwm-bg3
+ "I" FvwmBack
AddToFunc bg1 "I" Read /home/whoever/.fvwm/fvwm-bg4
+ "I" FvwmBack

and then have the contents of /home/whoeever/.fvwm/fvwm-bg1, for example, be:

*FvwmBackerDesk 4 xpmroot /usr/local/X11R6/include/X11/pixmaps/background1.xpm

> could be used instead?  Any advice here would be great.

FvwmForm could be used, but personally, I like seeing a menu that SHOWS me
what background I'm about to select, selecting it, and watching it change with
no further ado.

BTW, I've not tested the above, so something might not work, but I think you
get the idea.

-- 
Todd [email-masked]
http://www.cs.umr.edu/~tfries
--
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].