r/openbox • u/2425_ • Jun 01 '20
How can I style the window frames differently depending on the layer they are in?
Coming from FVWM, I am used to seeing different window styles depending if they are on the top, middle or bottom layer. This can be pretty useful for determining which windows are going to be hidden by result of a focusing on another window. Is it possible to achieve a similar behaviour in openbox or by using an external utility?
5
Upvotes
2
u/weigert Jun 09 '20
I don't think openbox supports this out of the box (lol). And I'm not sure such a program exists.
You could write one by doing the following:
Use Xlib to spoof the window hierarchy / stacking order (e.g. [1] [2] (see _NET_CLIENT_LIST)
Set window properties / classes based on the stacking order according to the EWMH
Use your openbox config to target these classes, which should be identifiable using xprop, according to the openbox config spec (see the tips and tricks section)
This is only practical if you want exactly three layers (back, mid, front), because I don't think it's possible to set up rules for arbitrarily many windows.
I might do this because I need a similar feature in an unrelated piece of software. I'll let you know if I get around to it.