[xmonad] announce: XMonad.Util.WindowProperties
Thomas Adam
thomas.adam22 at gmail.com
Wed Mar 19 18:14:35 EDT 2008
On 19/03/2008, gwern0 at gmail.com <gwern0 at gmail.com> wrote:
> On 2008.03.19 22:31:02 +0200, Roman Cheplyaka <roma at ro-che.info> scribbled 1.8K characters:
>
> > * gwern0 at gmail.com <gwern0 at gmail.com> [2008-03-19 16:26:07-0400]
> > > On 2008.03.18 20:54:32 +0200, Roman Cheplyaka <roma at ro-che.info> scribbled 1.4K characters:
> > > > Just pushed new module: XMonad.Util.WindowProperties.
> > > >
> > > > This module allows to specify window properties, such as title,
> > > > classname or resource, and to check them.
> > > > In contrast to ManageHook properties, these are instances of Show and
> > > > Read, so they can be used in layout definitions etc.
> > > >
> > > > It was a part of IM layout before, and now I hope it will help Braden
> > > > with his PlainConfig.
> > > >
> > > > --
> > > > Roman I. Cheplyaka (aka Feuerbach @ IRC)
> > >
> > > Is this module intended to also eventually include setters of window properties? (I only see getters.)
> >
> > It isn't.
> > Actually, I hear such idea for the first time. How do you see it?
> >
> > --
> > Roman I. Cheplyaka (aka Feuerbach @ IRC)
>
>
> Well, I was musing that there could be situations in which rewriting window properties on the fly could be useful. For example, you've seen my runOrRaise stuff? It doesn't work if, say, Emacs is inside a terminal. To solve this you would hypothetically write 'bind m "setWindowClass 'Emacs'"' (if you follow my pseudo-code). And who knows what other stuff you could do. For example, if you're allowed to create new window properties on a window, you could implement a per app copy-paste system!
But not all hints are settable -- for instance, whilst a WM_TITLE hint
is, there is no guarantee that it is to remain valid during the
application's lifetime (i.e., the application can rewrite it at any
time - *cough* firefox).
Then there are those hints such as WM_CLASS which are only settable
before the window is mapped (i.e., in the WithDrawn state). Using
xprop under the hood should allow you to realise this in part. But
compliance with the ICCCM here is paramount.
-- Thomas Adam
More information about the xmonad
mailing list