Exploring the XMonad tiling window manager
Graphical Interface
Many users never look back once they get started with a tiling window manager. A close look at XMonad shows why.
I am not much of a graphical guy when it comes to computing. I know this sounds a bit clichÈ for a *nix nerd, but I live in the command line. I am a software developer and all I need is both vi/Vim and grep (no flame wars please) and a command line, preferably Bash, to use them in. I do all of my development out of locally hosted headless virtual machines and SSH into those virtual machines via a wonderful feature called port forwarding. The graphical desktop environment tends to be an afterthought for me, but even though that may often be the case, I still prefer it to be functional and allow me to remain productive.
I miss the days of simplicity when less was more. Nowadays, there are more desktop environments to choose from. Some of which are very lightweight while others dip into the heavier side of things. And while choice is never a bad thing, too much choice can often be intimidating. For instance, which desktop environment is best suited for you? Which features or functions are you looking for most? Are you looking for a composite window manager or a tiling window manager? Wait, what? What are composite and tiling window managers?
Window Managers
Many of us *nix users have grown used to the mainstream desktop environments, which include Gnome, KDE, Xfce, LXDE, or your preferred desktop environment, and it becomes difficult to fathom that others (still) exist – but they do. As unique as some of them may be, each is powerful in their own right. But before I dive into one particular desktop environment, I wish to cover the basics of window managers.
What is a window manager? In short, it is a piece of graphical software that controls the placement of windows (bearing your applications) in a windowing environment. The outcome of such a thing is referred to as a desktop environment. There are different types of window managers.
The composite window manager will draw each window separately and allow for them to overlap in either a 2D or 3D environment. And for those graphical environments that are not composite window manager environments but still allow for overlapping windows, those are referred to as stacking window managers. In order to emulate the look and feel of overlapping windows, the environment must be (re)drawn from the background window first, all the way to the foreground. When the user decides to bring one of the background windows forward or decides to open a new window, each window behind it will be redrawn.
Then you have the tiling window manager. Windows are in essence displayed side-by-side or above and below the others, resembling that of a set of tiles. This is the type of window manager I will explore here.
Last, you have the dynamic window manager. What makes the dynamic window manager unique is its ability to dynamically switch between composite and tiling window managers.
Introducing XMonad
Now that I have explained the very basics and key differences of window manager types, I will move onto a specific, and probably my most favorite, tiling window manager: XMonad [1]. XMonad is both a powerful and lightweight tiling window manager written in Haskell. It isn't often that you hear of Haskell, but XMonad runs well with it.
Installation and Initial Startup
While you can always build from source (and there is absolutely nothing wrong with that), most modern Linux distributions will provide precompiled binaries and packages for installing XMonad. To install XMonad on an Ubuntu or other Debian-based distribution, type the following on the command line:
$ sudo apt install xmonad dmenu
You may immediately notice that you are not only installing XMonad but also a dynamic and very lightweight launcher menu for X called dmenu
[2]. You will soon know why you are going to need this menu application.
As soon as the applications (and their dependencies) are installed, log out of your current environment and, under your user profile (in the login manager), be sure to have XMonad selected. Then log back into the system (Figure 1).
At first, you may find things a bit concerning: You will immediately be greeted by a black screen, almost as if nothing is loaded. Do not worry. This is XMonad. I will cover some customizations later in this tutorial, but for now, I'll start with the basics.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.