[xmonad] some cleanup

Andrea Rossato mailing_list at istitutocolli.org
Fri Feb 1 05:00:58 EST 2008

On Fri, Feb 01, 2008 at 02:51:33AM -0600, Spencer Janssen wrote:
> I haven't been able to divine the logic behind the code to make either
> modification myself, but I might be able to with a bit of documentation tossed
> in there :)
> I'm inclined to leave the base layout as Full, even though that is slightly
> broken at the moment.  Thus are the perils of running software-in-development.

this could be a clean solution, but I didn't test it. Basically it is
a layout modifier that will take the first decoration and the first
window, and then would just select decorations.

That is, if placed on top of tabbed, it should be removing all
unfocused windows, without touching decorations.

-- | Removes windows for the tabbed layout
windowRemove :: l a -> ModifiedLayout WindowRemover l a
windowRemove = ModifiedLayout WindowRemover

data WindowRemover a = WindowRemover deriving (Show, Read)

instance LayoutModifier WindowRemover Window where
    redoLayout _ _ _ wrs = do nws <- end 
                              return (start ++ nws, Nothing)
        where start = take 2 wrs
              end   = filterM (isNotDeco) (drop 2 wrs)
              isNotDeco (w,_) = do b <- isDecoration w
                                   return (not b)

This way tabbed will be using Simplest, but xmonad would receive just
the first window and all the correctly placed decorations.

I'll test it and will let you know.[1]

Docs: actually I though it could be fun to have the help of someone
else to design the class, and improve its expressiveness. I didn't
documented it because this was intended as a proposal to being

I'd really beg you to read my previous messages and ask me whatever
question you feel like (if I start telling the whole story every time,
everything gets just more confused). I'm off the IRC channel also
because I don't want to make the same mistake I did with you last
time. This is quite difficult stuff for me, and I need to think a bit
before answering (I'm also a bit tired... that has been one of the
most rapid learning experiences I've had the last few years). 

I'd really appreciate any available help.


[1] At the present time, when I was trying to test it, I started
experiencing strange problems with the linker:

/usr/local/lib/xmonad-contrib-0.6/ghc-6.6.1/libHSxmonad-contrib-0.6.a(Combo.o): In function `s1e0s_info':
ghc3557_0.hc:(.text+0x3ada): undefined reference to `xmonadzmcontribzm0zi6_XMonadziLayoutziWindowNavigation_zdf3_info'
/usr/local/lib/xmonad-contrib-0.6/ghc-6.6.1/libHSxmonad-contrib-0.6.a(Combo.o):(.rodata+0xa8): undefined reference to `xmonadzmcontribzm0zi6_XMonadziLayoutziWindowNavigation_zdf3_closure'
collect2: ld returned 1 exit status

I've never touched neither WindowNavigator nor Combo... strange. I'll
clean and retry.

More information about the xmonad mailing list