My quest for a tiling window manager

I’ve never used a tiling window manager before, but lately I’ve been doing more and more with the command line, and I’ve been using vim-only for almost a year now, so it seems like a natural next step.

So I went through a few of them over the weekend looking for the right one. But first, some background.

What is a tiling WM?

Most computers have “floating window managers” that let windows overlap and let the user drag them around and resize them. In contrast to that, a tiling window manager stacks windows up side by side according to preset layouts and groups them into workspaces. That’s a huge oversimplification, but it’ll do for now.

Why the crap would you want that?

For one, they’re much easier to control using only the keyboard. Most of them have a “mod” key (usually either the left alt key or the windows/super key), and you control the WM doing stuff like mod+2 (switch to workspace 2), mod+j (focus on the window below the current one), mod+space (change layouts), etc.

Also, they save space since there are no window decorations and no space between windows.

Finally, lots of people like the automation this allows. You can say stuff like “open my IM client and windows in the third workspace using the three column layout” and you don’t have to arrange stuff manually or move anything around (although you can).

XMonad

I started with XMonad just because it had a really helpful page on using it as a drop in replacement for the default Gnome WM, so I could still use all the good stuff Gnome has to offer easily.

I had trouble with installation (on login, I kept getting “session not found” errors), and it turned out it was because I named one of the config files xnomad.desktop instead of xmonad.desktop without thinking. Once that was worked out, it was pretty smooth. It was basically Gnome 2 (including the panels) but with XMonad instead of Metacity.

I liked it, but I wanted to change a couple things (add a few non-core layouts and change the color of the red border on active windows, for example), and all configuration to XMonad is done in Haskell, and this threw me for a loop. Everyone said you could easily just copy and paste from sample configs on the net but I didn’t have any luck with that, and I didn’t want to have to learn Haskell just to configure my WM, so I moved on.

Awesome WM

Awesome and XMonad seem to be the two most popular nowadays, so it seemed logical to try them first. I apt-get’ted awesome and set it up to run inside of Gnome according to the instructions on the awesome wiki. This worked fine on the first try.

I didn’t really “get” awesome though. For example, awesome lets you tag windows rather than just stick them on workspaces, and each “workspace” is a tag, which means that windows can appear on multiple workspaces. I didn’t see the appeal of that. Also, I wasn’t a fan of the launcher because you couldn’t see what the remaining options are as you type like you can in dmenu and installing dmenu didn’t seem to work (hitting the key binding for it just redrew the screen). I also kept seeing weird gaps in between windows that I wasn’t able to fix. Finally, I tried switching the mod key from mod4 (windows key) to mod1, and it didn’t seem to change anything and I couldn’t figure out why. So I moved on out of frustration.

Scrot WM

Scrot WM came recommended on a couple of random forum threads so I tried it out. I apt-get’ted it and just ran it outside of Gnome since it was quicker to try out that way. I really really like Scrot WM for the most part. The default key bindings are vim-like which is great for me and it runs dmenu by default.

Unfortunately, the integrated panel doesn’t support any type of tray (I’d have to install something external like dzen2 which looked like a headache judging from the how-to’s I found), and when I tried integrating with Gnome, I couldn’t get the Gnome panel/tray to show up correctly. I’m not quite ready to leave a tray behind altogether (for stuff like chat notifications, the networking applet, etc.), so I moved on hoping to find perfection although I was sad to leave Scrot behind.

Stump WM

I didn’t try Stump WM out because the default key bindings are all very emacs-like which immediately put me off. Call it judging a book by its cover, but I wasn’t desperate yet.

dwm

I also didn’t try out dwm. It seems like the kind of thing that’s just a little too hardcore for me (you configure it by hacking the source code and recompiling), and I was looking for more of a beginner’s tiling wm for now.

Subtle WM

Subtle WM was an easy install (manually using Ruby/Rake) and it looks great by default. But it’s a manual tiling window manager, which means that you’re responsible for placing your windows where you want them, and they don’t just pop into the current layout on their own, and that wasn’t what I was after. I also had trouble figuring out how to use the thing - at first, I couldn’t do anything because the default terminal is urxvt which I didn’t have installed, and if you don’t have it, you basically can’t launch any programs. Once I installed it, the idea of clients and gravities didn’t click with me, so I gave up.

wmii, ion3, i3

All of these came recommended in a few places, but they’re all manual TWMs like subtle, so I moved on quickly, making a note to come back if/when I got desperate.

Back to XMonad

At this point, the tiny quirks I had with XMonad weren’t looking so bad, so I decided to log back into it and just give it a shot for a few days and see what I thought. That’s what I’m doing now, and so far, things are still going great. The default key bindings are vim-like (mod+j and mod+k to switch to the previous or next window, mod+h and mod+l to change the size of the master window) so it was easy to get used to quickly. There are tons of other layouts and goodies in the xmonad-contrib package but I haven’t opened that can of worms yet.

I really wanted to get xmobar and trayer going to get the full experience rather than using a Gnome panel, but for now, this’ll do. I’m really enjoying it so far.

If you have any questions or suggestions, feel free to stick ‘em in the comments.

Tags: Linux