Armaan Bhojwani


Window Managers

Last modified on Changelog.

Window managers (WMs) are the piece of software that manage the positioning of windows in the X display system. In a desktop environment, they are just one element, but many people run them standalone without a full desktop environment. There are three main types: floating, dynamic tiling, and manual tiling.

Tiling vs floating

This is an entirely personal choice. Most people are used to floating window managers, its what every major operating system and desktop environment uses, and is what best continues the literal “desktop” metaphor of GUI computing. Tiling window managers turn this upside down by placing your windows in a tiled layout, being able to see all of the windows at once. Most tiling window managers also allow you to float windows as well, and some can be used equally well as a floating window manager as they can be as a tiling window manager.

Dynamic vs manual tilers

I’ve always preferred tiling window managers, more specifically, I like dynamic tiling window managers which automatically place your windows in a predefined layout, often times with a notion of an ordering or a stack. This is unlike a manual tiling window manager which places windows with manual positioning, and will not use a predetermined layout when placing windows. Dynamic window managers provide more logic and consistency in my opinion, at the expense of a bit of freedom to where you position windows. Take the following layout, for example:

 -----------------------
|           |     B     |
|           |-----------|
|           |     C     |
|     A     |-----------|
|           |     |     |
|           |  D  |  E  |
|           |     |     |
 -----------------------

I can’t do this in most dynamic tiling window managers, but I can with a manual tiler like BSPWM. Instead, using spectrwm (my current dynamic tiling window manager), I am stuck with three layouts:

      vertical stack
 -----------------------
|           |           |
|           |     B     |
|           |-----------|
|     A     |     C     |
|           |-----------|
|           |           |
|           |     D     |
 -----------------------

     horizontal stack
 -----------------------
|                       |
|           A           |
|                       |
|-----------------------|
|       |       |       |
|   B   |   C   |   D   |
|       |       |       |
 -----------------------

         monocle
 -----------------------
|                       |
|                       |
|                       |
|           A           |
|                       |
|                       |
|                       |
 -----------------------

So while these layouts are a bit more restricting, I don’t find that it impacts me. The logic in the stack outweighs the limits in organization. On a dynamic tiler, I can hit Mod+J or Mod+K to go through the stack, and the focus goes to the windows that I expect it to. On a manual tiler, I need to think “how is the window that I want to go to positioned compared to this one” and give an appropriate left, right, up, down direction to move the focus to. This requires much more thought, and has no logic to it. While the three layouts shown above are the most common, and often the only three found in some window managers, creating new layouts in a dynamic WM is relatively easy. See DWM for example, there are many patches that add custom layouts like a Fibonacci spiral, three columns, etc. I used to use these alternate layouts more, but I have found that on a 13in laptop screen, the only two that makes sense is the classic vertical master/stack, and the monocle for whenever I need to quickly full screen something. If I need something to be full screen for longer amounts of time, I will usually send it to its own workspace so I don’t lose the windows under the monocled one.

Most dynamic tilers have the notion of the master and the stack, the master being the top windows in the stack. Usually this the first window, but it can also be more or less than that. Oftentimes layouts take advantage of this, like the master-stack layout which has the master window on the left, and the rest of the windows on the right. Some layouts on the other hand, don’t care about the number of master windows, like the Fibonacci layout found in certain tilers.

        fibonacci
 -----------------------
|           |           |
|           |     B     |
|           |           |
|     A     |-----------|
|           |  E  |     |
|           |-----|  C  |
|           |  D  |     |
 -----------------------

A tiling misconception

A common misconception about tiling WMs is that they are super lightweight, and you need to sacrifice your comfy desktop environment for them. In any desktop environment (although some make it harder than others), you can exchange just the stock window manager with another one without giving up your whole environment. Combining i3 and XFCE is a popular combination, and I used the Kröhnkite dynamic tiling extension for KWin on KDE for a good while.