[xmonad] Toggle window decoration

Norbert Zeh nzeh at cs.dal.ca
Sat Feb 4 21:06:32 CET 2012

Brandon Allbery [2012.02.04 1449 -0500]:
> On Sat, Feb 4, 2012 at 14:35, Norbert Zeh <nzeh at cs.dal.ca> wrote:
>     Brandon Allbery [2012.02.04 1425 -0500]:
>     > XMonad.Layout.MultiToggle
>     > One of the standard modifier toggles turns server-side borders on/off
>     > dynamically; you should be able to use the provided examples to work out
>     how to
>     > toggle a Decorations-based modifier.
>     Cried hurray too quickly.  MultiToggle seems to operate on entire layouts.
>      If I
>     have, say, 4 windows on a decorated layout, what I'd like to do is leave 3
>     of
>     them decorated, while removing the decoration from only one of the windows.
>      By
> Ah.  That'd be harder, yes, although  think it's doable; take a look at
> XMonad.Layout.Decoration.
>     "decoration", I don't mean borders.  I mean the title bar added by
> Right.  Most (all?) of those are based on XMonad.Layout.Decoration.

Indeed.  My idea of implementing this, though, was not to implement a new
decoration based on the framework provided by X.L.Decoration but to provide a
general layout modifier that allows me to toggle the decorations added by any
X.L.Decoration-based layout modifier.  I was thinking about storing the windows
that currently shouldn't have decoration in ExtensibleState.  Then, I'd have to
see how X.L.Decoration implements the addition of the tabs/titlebars.  I would
suspect it takes the rectangles provided by the underlying layout, shrinks them
to make room for the title bar, and draws the title bar.  If I can somehow hook
in my modifier as an intermediary that invokes the underlying layout, puts the
windows that should not be decorated aside, passes the remaining windows to the
decoration modifier, and finally puts all together, that would be ideal.  I'll
have to think a bit about how to do this cleanly.  For now, I just wanted to
know whether what I want can already be done essentially out of the box using
some existing modules.  Seems like the answer is no.


More information about the xmonad mailing list