Xmonad

Resources

xmonad is [[Article description::a fast and lightweight tiling window manager for X11]] written, configured and extended in the purely-functional programming language Haskell.

Installation

USE flags

USE flags for x11-wm/xmonad A tiling window manager

doc Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
hscolour Include coloured haskell sources to generated documentation (dev-haskell/hscolour)
no-autorepeat-keys Allow ignoring of keyboard autorepeat.
profile Add support for software performance analysis (will likely vary from ebuild to ebuild)
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)

There are two ways to install XMonad. The Gentoo recommended method is to use Portage so that the package will be integrated into the system's package database.

Emerge

Merge the x11-wm/xmonad package:

root #emerge --ask x11-wm/xmonad

Cabal (unsupported)

It is possible to install using cabal, although it is not the Gentoo recommended method for installation system-wide packages. When choosing this route proceed with caution (Portage will not track xmonad)!

user $cabal install xmonad

Configuration

Starting

Start xmonad using a display manager or the startx command.

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

FILE ~/.xinitrc
<syntaxhighlight lang="bash">exec ck-launch-session dbus-launch --sh-syntax --exit-with-session xmonad</syntaxhighlight>

~/.xmonad/xmonad.hs

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

Minimal configuration file with default configuration:

CODE Primitive xmonad.hs
<syntaxhighlight lang="haskell">import XMonad

main = xmonad $ defaultConfig</syntaxhighlight>

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 the 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 an external program. Usually, xmobar, or dzen is a good choice for a status bar.

xmobar

Install x11-misc/xmobar:

root #emerge --ask x11-misc/xmobar

dzen

Install x11-misc/dzen:

root #emerge --ask x11-misc/dzen

External resources

This article is issued from Gentoo. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.