Subject: FVWM: changing backs from menu

From: Chad Coulliette <[email-masked]>
Date: Tue, 05 Dec 1995 13:33:19 -0800

Hello Everyone,

I would like to say again that fvwm2 is quite awesome!  It adds an entirely
new depth to working with your computer.  After using it for only a couple
of weeks now, it would be very difficult to go back to twm.

I have been trying to work out a way to have menu options for choosing 
different backs for our network of Suns.   I used an idea suggested by Todd
Fries and cofirmed by Chuck Hines.  Here is the implementation so far

# Function for changing background patterns from menu
AddToFunc ChangeBack "I" Exec exec echo *FvwmBackerDesk $0 $1 > .fvwm2bktmp
+         "I" Read .fvwm2bktmp
+         "I" FvwmBacker

# Background Patterns
AddToMenu BackPatterns "Backgrounds" Title
+              "Honeycomb" ChangeBack $CurrentDesk "xpmroot 
/usr/local/X11R6/include/X11/pixmaps/background1.xpm"
+              "Lighthouse" ChangeBack $CurrentDesk "xv -root -quit -max 
/usr/local/share/backgrounds/lighthouse.gif"

This is a very nice streamlined method, theoretically speaking. :-)  It creates
a file with the appropriate command to send to FvwmBacker, then reads the 
command from the temporary file.  There are two problems, though.  First, there
is global variable CurrentDesk that can be accessed from the menu, i.e. 
$CurrentDesk=''.  Does anyone know if there is a variable that has the value
of CurrentDesk?  Second, if I replace $CurrentDesk with a number, say 1, then
the FvwmBacker loads the new image or pattern, but the default image specified
in the .fvwm2rc file still dominates.  If you switch desks from desk 1 and then
back, the new pattern is there, but gets covered quickly by the default 
background pattern.  Does anybody know any solutions for this?

Thanks,

Chad
-- 
Chad M. Coulliette
[email-masked]
Applied Mechanics and Engineering Sciences
University of California, San Diego

--
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]
Date: Wed, 06 Dec 1995 12:45:57 +0100 (MET)

Hi Chad,

> /usr/local/share/backgrounds/lighthouse.gif"
...
> If you switch desks from desk 1 and then

I suppose this is caused by a previously called instance of FvwmBacker.
Try adding a "KillModule FvwmBacker" before starting the new one.

Ciao,
 Andy.
___________________________________________________________________________
  Andy Spiegl, Institute for Applied Mathematics
  University of Technology, Muenchen, Germany
  E-Mail: [email-masked]
  http://www.appl-math.tu-muenchen.de/~spiegl/

Above all else - sky.