xmonad - The Speed Demon

by Ostatic Staff - Mar. 04, 2013

I’ve been noticing my work machine getting slower, and slower, and slower over the past few months, and over the weekend it finally gave up the ghost and died. For the past five years I’ve been using the most current version of OS X on an old MacBook Pro, but the Mac had a hardware problem. When I dropped by desktop support with the dead Mac, they offered me an equally old Mac, or a new PC. I chose the PC. I’ve returned to Ubuntu for the first time since 2008, and I’ve gone the minimalist route with xmonad, the tiling window manager. I’ve got one thing to say about the new setup, this thing is fast.

To answer the most obvious question, the reason I’ve decided to go with xmonad is simply a matter of purpose. My work machine needs to be a responsive, efficient workhorse. I don’t need chrome, or twitter alerts, or fancy 3D animations, I simply need a machine that will get me a secure shell into any given server as quickly as possible. I also occasionally need to be able to generate reports, or create documentation, and of course communicate with the rest of the company over email or chat. What I noticed about my use of OS X over the years is that I had extended it with third party programs to force it to behave in a keyboard-centric way. I had, unwittingly, hobbled together an “xmonad-like” experience in an effort to create the most efficient workflow possible.

The xmonad project strips out all unnecessary cruft from the desktop Linux experience. As explained on their home page:

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.

Haskell is a “purely functional language”, popular among academics and those with a deep interest in programming languages. The developers claim that by using Haskel and “smart programming practices”, xmonad can guarantee a crash-free experience. Configuring xmonad reveals the Haskell roots of the window manager. The configuration file is actually a very small, very specialized, Haskell program that is compiled by xmonad. Here is a bare-bones example:

main = xmonad $ defaultConfig
{ borderWidth = 2
, terminal = "urxvt"
, normalBorderColor = "#cccccc"
, focusedBorderColor = "#cd8b00" }

It will be interesting to learn more about Haskell as I dig deeper into xmonad. However, the main benefit of a tiling window manager is it’s efficiency. In OS X I used a third party program to assign keyboard shortcuts to window positions, in xmonad, the entire window manager is keyboard driven, and automatically arranges the windows in a sensible way.

I was, for a time, a bit intimidated by xmonad. It can seem overwhelming, but after only a few days I already feel like I’m faster at most things. Taking away the choice of where and how to arrange my windows frees me to concentrate on other things, like getting my work done. Admittedly, where and how to arrange windows is normally a minor task, but the cumulative effect of taking time to arrange multiple, layered windows is less time spent doing the work you intend the machine to do. xmonad is not a casual users tool, it is very specialized, and very powerful. If you make your living using a computer, I encourage you to consider xmonad, it is well worth the investment.