[openbox] Can I dynamically change a client window's role?
danakj at orodu.net
Tue Mar 9 20:53:57 EST 2021
On Tue, Mar 9, 2021 at 6:11 PM Parke <parke.nexus at gmail.com> wrote:
> On Tue, Mar 9, 2021 at 1:57 PM Mikael Magnusson <mikachu at gmail.com> wrote:
> > > So, my question is: Is it possible to dynamically change the
> > > _OB_APP_ROLE property for a pre-existing client window?
> > On 3/9/21, Parke <parke.nexus at gmail.com> wrote:
> > You can't, and it wouldn't affect anything either way. The role of a
> > window only serves to identify it uniquely for session restoration.
> I'm confused. The wiki clearly states that the If action can branch
> based on a window's role.
> In fact, I already have a mousebind and a keybind that branch based on
> the window's role, and it works as documented in the wiki.
> So role does have uses besides session restoration.
Yeah.. so the role hint is used for session restore. Openbox lets you
repurpose it for other things. The OB_APP_ROLE isn't a real hint.. it's a
cached value so that you can see what Openbox read when the window
appeared. in case the app changes it afterward - which would have no effect
as per the spec. So that's why you can't change it and expect something to
To have a window change its behaviour would require another
openbox-specific property which currently doesn't exist. And watching for
changes to that property to reapply settings, which also doesn't exist.
The title property on the other hand can change according to the spec, and
Openbox would see those changes. Otherwise.. you'd need to invent a whole
other unspecced hint I guess, and set that hint through some 3rd-party app
onto other windows.
Anyhow, if you can get a 3rd party app to write to the window's title that
might work for you, depending.
> openbox mailing list
> openbox at icculus.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openbox