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
-
Red Hat Adds New Deployment Option for Enterprise Linux Platforms
Red Hat has re-imagined enterprise Linux for an AI future with Image Mode.
-
OSJH and LPI Release 2024 Open Source Pros Job Survey Results
See what open source professionals look for in a new role.
-
Proton 9.0-1 Released to Improve Gaming with Steam
The latest release of Proton 9 adds several improvements and fixes an issue that has been problematic for Linux users.
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.