Important: You are required to change your passwords used for Gentoo services and set an email address for your Wiki account if you haven't done so. See the full announcement and Wiki email policy change for more information.


From Gentoo Wiki
Jump to: navigation, search
External resources

xmonad is a fast and lightweight tiling-windowmanager for X11 written, configured and extended in the purely-functional programming language Haskell.


Generally, there are two ways to install XMonad:

root # emerge --ask xmonad


user $ cabal install xmonad



To start xmonad you can use a display manager or startx.

If want to use startx and want ConsoleKit support, setup ConsoleKit and create the following file:


exec ck-launch-session dbus-launch --sh-syntax --exit-with-session xmonad


XMonad itself can be configured through ~/.xmonad/xmonad.hs which is written in Haskell.

Minimal configuration file with default configuration:

CodePrimitive xmonad.hs

import XMonad

main = xmonad $ defaultConfig

Once you changed your config file you should compile it and restart XMonad.

user $ xmonad --recompile
user $
xmonad --restart

In most cases to write a config file you need additional features provided by xmonad-contrib library. You can install it from x11-wm/xmonad-contrib

root # emerge --ask xmonad-contrib

OR using cabal:

user $ cabal install xmonad-contrib

Adding status bars

Unlike many other window managers, XMonad does not have any built-in status bars. Instead of this it can pipe required information to external program. Usually, xmobar or dzen is a good choice for status bar.

root # emerge --ask xmobar


root # emerge --ask dzen

External resources