Subject: Re: FVWM: Dynamically changing styles for icons

From: Elliot Sowadsky <[email-masked]>
Date: Tue, 21 Oct 2003 15:48:29 -0700 (PDT)

<<
The title bars of my xterms begin with text in the form
'(<user>@<hostname>)' which updates after an su, but FVWM doesn't react
to the change.

I have something similar for clearcase views.

*FvwmEvent window_name winame_event
AddToFunc winame_event
+ I WindowID $0 (Xcmd) WindowID $0 ("entering*") Style $n Colorset 1, HilightColorset 7
+ I WindowID $0 (Xcmd) WindowID $0 ("exitting*") Style $n Colorset 3, HilightColorset 4
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Mikhael Goikhman <[email-masked]>
Date: Wed, 22 Oct 2003 02:40:55 +0300

> + I WindowID $0 (Xcmd) WindowID $0 ("exitting*") Style $n Colorset 3, HilightColorset 4

I would like WindowId not to be suggested for the things that do not
require it. For 2.4.16+ use:

  AddToFunc winame_event
  + I ThisWindow (Xcmd) ThisWindow ("entering*") Style $n Colorset ...
  + I ThisWindow (Xcmd) ThisWindow ("exitting*") Style $n Colorset ...

And for the future 2.5.8+ use a more appropriate:

  AddToFunc winame_event
  + I ThisWindow (Xcmd) ThisWindow ("entering*") WindowStyle Colorset ...
  + I ThisWindow (Xcmd) ThisWindow ("exitting*") WindowStyle Colorset ...

Regards,
Mikhael.

---

From: Andy Arbon <[email-masked]>
Date: Wed, 22 Oct 2003 11:23:01 +0100

Hello,

Thanks to all that replied. I've tried implementing what you suggested, 
but it's not working yet. I was hoping someone could spot what I've done 
wrong..

I have the following in my various fvwm .rc files:

Module FvwmEvent

Colorset 1 fg #cccccc, bg #555570
Colorset 2 fg #cccccc, bg #990000

DestroyFunc winame_event
AddToFunc winame_event
   + I ThisWindow (Xcmd) ThisWindow ("*(root@*") Style $n Colorset 1
   + I ThisWindow (Xcmd) ThisWindow ("*(ara@*") Style $n Colorset 2
   + I Exec exec echo "The function fired"

When the title of a window changes I get the line "The function fired" 
output at the console, so I'm happy that the event side of things is 
working, but for some reason the style of the window is not being 
updated to the second colorset.

I am using 2.5.7, if that is relevant.

Many thanks,

Andy

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 22 Oct 2003 16:42:17 +0000

> *FvwmEvent window_name winame_event

Please use the documented syntax:

  *FvwmEvent: window_name winame_event

> updated to the second colorset.

You should remove the "ThisWindow (Xcmd) " bit, or replace it with
"ThisWindow (XTerm) ", otherwise it will never match your window.

> I am using 2.5.7, if that is relevant.

The fvwm version is always relevant when asking on this list.

Regards,
Mikhael.