Changing buttons (titlebar) of specific window

Hello and sorry if this question has come up already. Couldn’t find answers myself.

I’ve got one button on the titlebar that I use to set the layer for the window (kinda on top/on bottom switch).

What I’d like to do is change the appearance of the button depending on the layer that the window is set to. But I can’t figure out how to change the button style for a specific window (other than switching the whole decoration).

Is there a way to do this in Fvwm? Thank you for your help.

(I’ll just add these three mock-ups here to clarify what kind of buttons I want to change between)

You would have to change the entire decor. You can probably use the following as a basis: … q.html#WC3

The test condition would have to be something like:

ThisWindow (Layer n) ....

– Thomas Adam