Subject: FVWM: Changing Decor in a Function

From: [email-masked] (Martin Cartwright)
Date: Fri, 17 Jan 1997 16:03:11 GMT

As anyone who has looked at my desktop recently will be aware I love all
this decor stuff.. The more decorated (or poncy as people like to say) my
windows the better. Now that this decor has come along I've got a default
decor, an xterm decor and a sticky decor. I've just added two functions
so that when I change a window to being Sticky, it's decor changes and 
vice versa....

AddToFunc Change-Stick		 "I" Stick
+				 "I" ChangeDecor "sticky"

AddToFunc Un-Change-Stick	 "I" Stick
+				 "I" ChangeDecor "Default"

But this requires two separate options on a menu.. Is there a way of
getting the thing to toggle the Decor on and off instead? A kind of..

if STICKY:
	Stick
	ChangeDecor "Default"
else
	Stick
	ChangeDecor "stickydecor"
endif

?????

Cheers,  Martin

[email-masked] - http://star.pst.qub.ac.uk/~imc/vom.htm
-/-----------------------------------------------------------\-
|  "Who do you think you are, Wat Tyler? You can have the     |
|   day off when you die and not before."                     |
-\-----------------------------------------------------------/-
--
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: lar3ry gensch <[email-masked]>
Date: Fri, 17 Jan 1997 12:33:34 -0500

>         ChangeDecor "stickydecor"

Add these lines to your .fvwm2rc file:

#########################################################
DestroyFunc	SwitchDecor
AddToFunc	SwitchDecor
+ "I"	StickyDecor

DestroyFunc	StickyDecor
AddToFunc	StickyDecor
+ "I"	ChangeDecor	"Sticky"
+ "I"	DestroyFunc	SwitchDecor
+ "I"	AddToFunct	SwitchDecor "I" DefaultDecor

DestroyFunc	DefaultDecor
AddToFun	DefaultDecor
+ "I"	ChangeDecor	"Default"
+ "I"	DestroyFunc	SwitchDecor
+ "I"	AddToFunct	SwitchDecor "I" StickyDecor

ChangeDecor	"Default"
#########################################################

When you want to toggle from one to another, just execute SwitchDecor.

-- 
(void) lar3ry();                                      [email-masked]

     "Sometimes it happens.  People just explode.  Natural causes."

---

From: Andrew Veliath <[email-masked]>
Date: Fri, 17 Jan 1997 06:43:09 -0500 (EST)

Just a small comment, when using AddToFunc with all "I" commands, make
sure you put the first command on the AddToFunc line, such that AddToFunc
MyFunc "I" MyCommand, otherwise you will get a ClickTime delay.

I found this out the hard way :-). 

--
Andrew Veliath <[email-masked]>        http://www.rpi.edu/~veliaa
One day, all forms of communication will be superseded by a FAQ.
Finger for PGP Public Key
Key fingerprint =  51 56 5D 3E 51 43 8B 74  7C B2 E4 B6 84 8E 8B 08