On 11/05/2012 09:04 AM, Bastian wrote:
On 05Nov12 08:40 -0700, Jaimos F Skriletz wrote:
So you could do something like this
AddToFunc TagWindow
+ I Pick
+ I TestRc (Error) Break
+ I State $0 1
+ I WindowStyle BorderColorSet foo, HilightBorderColorset bar
If you have a way to toggle the state of the window (so you can turn
off State 10 in your case, you will have to do something similar and
reverse the colorset change on the border color)
Thank you for this comprehensive instructions.
Using WindowStyle does the job.
Off topic: Using conditional commands (Pick, All ,...) without a command
in the same line does not work for me.
In general that is correct, you need All (conditions) Action, Next
(conditions) Action, etc
The idea is things like Raise, Move, WindowStyle need to know what
window you want to do it for and the conditionals find the right window.
ThisWindow is a useful one to use once you already have the window
chosen/context is known.
I am under the impression that Pick is slightly different in once you
pick the window the context is known so you only have to pick the window
once and then run multiple things on that window. That example I gave
you comes directally from the man page for FVWM 2.6.5 so if it doesn't
work (I haven't had time to test it) it is a bug with the man page. In
that case you may want to do something like this instead
AddToFunc ToggleWindow
+ I Pick (Conditions) CustomStateFunction
AddToFunc CustomStateFunction
+ I State ...
+ I WindowStyle ...
+ I Move ...
and so forth. The reason why you want to do that is you don't want the
function to pause and have you pick the window for each action in your
function.
The other option is to use the ThisWindow conditional, so + I ThisWindow
(conditions) Action. I will admit I'm a bit unsure as to the proper
method, but that should be enough to play with to get it to work as
expected.
jaimos