dwm Nov 8, 2010

A tilingwindow manager for X, written in C. "Tiling window manager" means that dwm automatically arranges your windows to fill your screen and not overlap. (There are many tiling window managers other than dwm.) "For X" means that it is usable on computers running Linux or another platform which supports the graphical X Window System. As of this writing, dwm lives on the internet at http://dwm.suckless.org/. If you are on Windows, you might try bug.n, a dwm clone for Windows. (Let me know if it's any good!)

Tiling?

I was skeptical at first too. The idea is threefold.

First: that too much time is spent arranging, resizing, and switching between windows. For some this is a nonissue---for example, if the primary application you use is a web browser. (Don't get me started on what's wrong with web browsers.) For others, who go through a hundred terminals a day, it can be very expeditious to have every new window automatically arranged.

Second: multiple virtual screens, called workspaces or tags. Since tiled windows are fully visible all the time, it is useful to have more than one rapidly switchable "screen" containing windows. This allows the user to group windows likely to be used together in one visual space, while keeping other windows ready in their own groups off screen.

Third: hotkeys. As with the first point, this one depends on your window consumption rate and what sorts of applications you use most often. Instead of using the mouse to select a window's name from a bar or clicking on the window itself to select it (both of which take time to move your hand from the keyboard to the mouse and back), hotkeys are used to select workspaces and to change the focus among the windows currently on screen (such as Alt-Tab or Alt-1, Alt-2, etc.). Hotkeys are also used to start programs, in lieu of a "start bar"-type widget. (Alt-P, all or part of the name of a program, Enter.) All hotkeys are customizable, of course.

Is dwm for me?

Configuring dwm is achieved through modification of its source code. It's not as bad as it sounds (most of the things you might want to customize are cleanly separated out into a config.h file), and there are plenty of examples on the dwm website and floating around the internet.

* you go through a fair number of keyboard-centric windows

This is not to say that dwm doesn't support mouse interaction, or that you should feel guilty every time you touch the mouse, but dwm is at its most powerful when combined with a user who takes advantage of the keybindings.

* you are interested in customizing your computer's interface

The default configuration of dwm is good, but with a little tinkering it can become excellent. The "patches" section of the dwm website is a great place to start.

The technical bits

If you are on Linux and your distribution has them, install the dwm-tools and libxinerama-dev packages. Otherwise, you'll need to get these (or equivalent) on your own. dwm-tools contains handy programs like dmenu (used to show a temporary keyboard-controlled menu on the screen). libxinerama is an extension to X which allows for multiple physical monitors. Do not use the /usr/bin/dwm included with dwm-tools to run dwm. Compile from the source so you can customize it.

Download the source from the dwm homepage. If you don't want to look at that page, you may find the latest version here or use the Mercurial repository here. Make and install. On my system, the default install location is /usr/local/bin/dwm.

You may need to install gconftool-2, or instead use a graphical program like gconf-editor.

Log out, log in, and you should be in dwm! Make sure you look up the default keybindings before you do this, so you know how to spawn a terminal, quit dwm, etc.

To restore your old window manager, set /desktop/gnome/session/required_components/windowmanager to the old value, and optionally turn the nautilus desktop management back on. If the old value was gnome-wm, comment out the export line in your .gnomerc file.

Send any questions, additions, corrections, differences between my system and yours, success stories, or insults to my /msg box.