Change Style depending on the value of the Style Property

I have this in my config file:

Key w A 4 Style * Title Key w A 4S Style * !Title

Would it be possible to change the style of a window depending on the property of the window, like:

If window has the property Title Style * !Title If the window has the property !Title Stype * Title

Cheers!

Edit: I manage to do it by setting an environment variable and a function:

[code]SetEnv W_TITLE 0
Key w A 4 F-Title

{{{ F-Title: change title of windows

DestroyFunc F-Title
AddToFunc F-Title

  • I Test (EnvMatch W_TITLE 0) F-Title-Yes
  • I TestRc (NoMatch) F-Title-No

+ I Test (EnvMatch W_TITLE 1) F-Title-No

F-Title-Yes: windows with title

DestroyFunc F-Title-Yes
AddToFunc F-Title-Yes

  • I SetEnv W_TITLE 1
  • I Style * Title

F-Title-No: windows with no title

DestroyFunc F-Title-No
AddToFunc F-Title-No

  • I SetEnv W_TITLE 0
  • I Style * !Title

}}}[/code]