Warning: THE VOID WIKI IS DEPRECATED. It is no longer being maintained, contains outdated and incorrect information, and will eventually be shut down. Please refer to the Void Handbook, https://docs.voidlinux.org/, for the official documentation. If you can't find the information you're seeking, please raise an issue at https://github.com/void-linux/void-docs/issues

Xmonad

From Void Linux Wiki
Jump to navigation Jump to search
Xmonad is a dynamically tiling X11 window manager that is written and configured in Haskell. In a normal WM, you spend half your time aligning and searching for windows. Xmonad makes work easier, by automating this.


Installation

There is an Xmonad package available on the void repositories, but it only contains an xmonad executable mostly useful for convenient recompiles. Xmonad needs to be recompiled for configuration and for that reason it requires downloading the Haskell ecosystem. This suite of tools includes a Haskell package manager, Cabal, that can be used to install the most recent version of Xmonad and its extensions.

Installation of Haskell Tools

xbps-install -S ghc cabal-install

To get the cabal database:

cabal update

Installation of the window manager

If you try to install Xmonad with cabal, you'll find that it can't end the installation and exits on a cryptic error message. This can be solved. At the time of writing, a Haskell package called X11 will fail. In general, if you get cryptic error messages while installing a big package with cabal, you'll see which dependency failed and try that dependency alone. This will show that X11 requires some additional X libraries.

xbps-install -S libXinerama-devel libXrandr-devel libXScrnSaver-devel

Finally, Xmonad installation:

cabal install xmonad

Extensions

Usually, for further customization (extensively documented around the web and with no particularities on Void) you'll want the xmonad-contrib package, also available in cabal. Again, if you try at first "cabal install xmonad-contrib" it would fail. If you try cabaling the dependency that fails you'll see it needs the pkg-config program. Once you install it through xbps you'll be able to install the xmonad-contrib package. So:

xbps-install -S pkg-config

Then:

cabal install xmonad-contrib