Skip to content

Three tiling window managers compared - xmonad, dwm, and i3

Update: This post is out of date but I've kept it because it provides screenshots of i3 which may still be useful. My current favourite is none of those discussed here, it's spectrwm. For more about this, please see Four tiling window managers. Download Spectrwm here.

Introduction
As you may know if you have followed some of the previous posts here, I used icewm as my window manager for a good many years, because I liked its simplicity and unobtrusiveness. As its documentation says, it does its work and gets out of your way. Just what I like.

As time went by I found I was working more with windows in fullscreen mode rather than stacked, swapping between them as needed. Icewm has a menu that allows you to do this, so you know what you have open. But it then occurred to me that I was using icewm as if it were a tiling WM. So why not look into the world of real tiling WMs to see if there was something that would suit me even better than icewm?

I first tried xmonad, which I liked a lot. But, being written in Haskell, it was pretty difficult to configure. So I next looked at dwm, which is visually and functionally similar to xmonad, with quite similar default key bindings. It was simpler to configure than xmonad, being written in C. I don't know C but I found it considerably easier to guess how the configuration file worked than was the case with xmonad, with its Haskell code.

One minor disadvantage of dwm was that to test a new configuration involved restarting the thing, but since I didn't keep making changes that wasn't too serious. What I found more annoying was the lack of anything like a menu to show what other windows were open. In other words, if I was viewing the browser and wanted to switch to, say, mutt, I ended up cycling blindly through the windows until I arrived where I wanted to be - and it was easy to overshoot. Of course, I could also go to tiled layout and choose the correct window there, followed by a return to fullscreen, but it was not very intuitive..

I3
I then had a look at i3. I hadn't done so previously because the docs said it was primarily for developers, but I liked it quite a lot. I used it for a time but I have now switched to spectrwm, as indicated at the head of this post. I find that spectrwm offers the same features as i3 and is more intuitive to use. If you like i3 please do look at spectrwm as well.

Here is the default tiled layout, with several windows open. The browser is the selected window in this case. I can easily add another window with Mod+Enter, or I can start a new application using dmenu (Mod+d).



Now I press Mod+w to get the tabbed layout, which shows the selected window (my home page in my browser). Although this occupies the whole screen apart from the upper and lower bars, it is not actually fullscreen. I can change to any of the other windows by shifting to a different tab, either with the keyboard or with the mouse.




If I want true fullscreen (seldom needed), I press Mod+f. Now the bar disappears. In this mode I can't switch to a different window; I must toggle fullscreen with Mod+f again to return to tabbed layout. To shift to a different window I must first press Mod+f again to get back to the tabbed layout.



There is also an alternative layout to tabbed - the stacked layout (Mod+s). which is what I use most of the time.



I emphasise that this by no means exhausts all the options that i3 offers. For example, you can have the windows tiled in a grid, e.g. 4x4, and you can have different workspaces as you do in other WMs. These are called tags in dwm, but they work in the same way. I can see why they would be useful if you had a lot of applications open, but seldom have more than 3 or 4 windows open and using more workspaces would be confusing. (See the official i3 web page for details of all this.)

The main exception is xsane, used for manipulating my flatbed scanner. This opens several drop-down windows, and these work best if you change to floating mode (shift + mod + space). I find it's best to do this in a separate workspace, otherwise it becomes confusing.

Configuring i3 is very easy*; you just edit the config file (~/.i3/config). This is a plain text file. Here is my config, with comments. Note that i3 has a strange idea of the keys to use for moving around: instead of h,j,k.l it shifts everything to the right and uses j,k,l,semicolon. As I'm used to h.j,k,l in vim I changed the default arrangement in i3. If you do this you must also change Mod+h (which by defajult gives a horizontal arrangement of windows), otherwise you will get an error message because you have Mod+h mapped to two different commands.

*These remarks apply to version 4.1 of i3.

Note: If you ever find that i3 seems to have locked up, so that you can't change to a different tab, check first that you are not fullscreen. If that is not the problem, do Mod+Shift+R to reload, which should make things work again.



Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

Anonymous on :

If i3 seemingly locks up, you should also check if caps-lock is on.

febs on :

Thanks, nice intro to i3. I found it more helpful than the official documentation.

Kishore on :

After googling and reading i3, xmonads, your config finally solved my day. I could get the basic stuff working with i3

Thanks for the article. Keep it going..

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
How many legs do snakes have?
Form options