[xmonad] How to use XMonad.Util.NamedWindows from xmonad-contrib?

Don Stewart dons at galois.com
Mon May 5 17:09:57 EDT 2008

> I don't know haskell, so I don't understand the extensions'
> describtion. I just need to add window titles to my windows.
> I'm using xmonad 0.7.


You just need to pick up the configuration syntax, a little, and there's
lots of examples in the docs, so its not too hard to pick up.

So, to add titles to all windows, you'd use one of the layouts
that provides window titles, such as:


To actually use this, you edit your  ~/.xmonad/xmonad.hs file to

 import XMonad.Layout.DwmStyle

which brings the DwmStyle layout into scope. And then edit your
layoutHook by adding the DwmStyle decoration to your layout:

  main = xmonad defaultConfig { layoutHook = myLayout }

  myLayout = dwmStyle shrinkText defaultTheme (layoutHook defaultConfig)

A  complete, simple xmonad.hs that adds dwm-style window titles to 
each window would then be:

    import XMonad
    import XMonad.Layout.DwmStyle

    main = xmonad defaultConfig {
                    layoutHook =
                        dwmStyle shrinkText defaultTheme
                            (layoutHook defaultConfig)

Put that in your xmonad.hs file and load it with mod-q.
I've added this full example to the documentation.


More information about the xmonad mailing list