Top 4 reasons I use dwm for my Linux window manager

A window manager handles the sizing and arrangement of the windows you open, among other things.
512 readers like this.
How Linux got to be Linux: Test driving 1993-2003 distros

Internet Archive Book Images. Modified by Opensource.com. CC BY-SA 4.0

I like minimalistic views. If I could run everything in a terminal I would. It's free from shiny stuff that hogs my resources and distracts my feeble mind. I also grow tired of resizing and moving windows, never getting them to align perfectly.

On my quest for minimalism, I grew fond of Xfce and used it as my main desktop environment for years on my Linux computers. Then, one day I came across a video of Bryan Lunduke talking about the awesome window manager he used called Awesome. It neatly arranges all of your windows for you, and so, sounded like just what I wanted. I tried it out but didn't get the hang of the configuration needed to tweak it into my liking. So, I moved on and discovered xmonad, but I had a similar result. It worked fine but I couldn't get around the Haskell part to really turn it into my perfect desktop.

Years passed and by accident, I found my way to suckless.org and their version of a window manager called dwm.

In short, a desktop environment such as KDE, Gnome, or Xfce includes many things, of which a window manager is one, but also with select applications. A window manager alone handles (among other window related things) the sizing and arrangement of the windows you open. Different desktop environments use different window managers. KDE has KWin, Gnome 2 has Metacity, Gnome 3 has Mutter, and Xfce has Xfwm. Conveniently, for all of these, you can change the default window manager to something else, which is what I've been doing for a while. I've been switching mine to dwm, and here's why I love it.

Dynamic window management

The killer feature for dwm, as with Awesome and xmonad, is the part where the tool automatically arranges the windows for you, filling the entire space of your screen. Sure, for most desktop environments today it's possible to create keyboard shortcuts to arrange windows to the left, right, top, bottom or full screen, but with dwm it's just one less thing to think about.

Dwm divides the screen into a master and a stack area. There are three layouts to choose from: tile, monocle, and floating. When using tile mode, which is what I use the most, it puts the window which requires the most attention in the master area while the others are tiled in the stack area. In the monocle layout, all windows are maximized and you toggle between them. The floating layout allows you resize the windows as you want (as the most window managers do), which is handy if you're using Gimp or a similar application where custom size windows makes more sense.

Usually, in your desktop environment, you can use different workspaces to sort your windows and gather similar applications in designated workspaces. At work, I use one workspace for ongoing work and one for internet browsing. Dwm has a similar function called tags. You can group windows by tags and by selecting a tag, you display all the windows with that tag.

Efficiency

Dwm is efficient if you want to save as much power as you can on your computer. Xfce and other lightweight environments are great on older or weaker machines, but dwm uses (in my case) about 1/3 of resources compared to Xfce after login. When I was using an eee pc with 1 GB RAM it made quite a difference if the memory was occupied to 660 MB or 230 MB. That left me with more room for the editors and browsers I wanted to use.

Minimalistic

I typically set up my applications beside each other: the terminal as the master window (usually running Vim as an editor), a browser for email, and another browser window open for research or Trello. For casual internet browsing, I fire up a Chromium window in another workspace or a tag as I mentioned earlier.

Screenshot by author.

With standard desktop environments, you often have at least one or two panels, top and bottom or on the side, taking up space. I have tried out the autohide panel function that most of them have, but I was annoyed every time I accidently put the mouse pointer too close to the edge and the panel popped out at the most inconvenient time. You can make them smaller as well but I still enjoy the minimalistic status bar on top of the screen available in dwm.

Speed

When evaluating speed, I count both how quickly dwm is loaded when I log in and how quickly the applications launch when I start them. When using newer, faster computers you might not care about this detail yet, but for me, there is a noticable difference between various desktop environments and window managers. I don't want to actually wait for my computer to perform such easy tasks, it should just pop up. Also, using keyboard shortcuts to launch everything is faster than using a mouse or a touchpad, and my hands don't have to leave the keyboard.

Conclusion

That said, I would not recommend dwm to the novice user. It takes some time to read up on how to configure it to your liking (unless you are satisfied with the setup provided by your Linux distribution). I have found some of the patches you might want to include can be tricky to get working and the support community is small (the IRC channel states "No patch-handholding"). So, it might take a bit of effort to get exactly what you want. However, once you do, it's well worth that bit investment.

And hey, it looks as awesome as Awesome.

Tags
User profile image.
Jimmy Sjölund is a Principal Agile Practitioner at Red Hat, focusing on organisation transformation and team excellence while exploring agile and lean workflows. He is a visualisation enthusiast and an Open Organization Ambassador.

16 Comments

I've been thinking of doing a minimalist computing experiment in 2018, and dwm looks like a good candidate for a window manager. It's gone on my list!

I received a comment on Twitter that I could have mentioned i3 (https://i3wm.org/) among the alternatives and that's true, I should have mentioned i3. It slipped my mind as I, for reasons unknown, have never tried out i3. Perhaps I should give it a go ...

I personally use i3 and appreciate the ability to configure my work spaces for individual tasks.

In reply to by jimmysjolund

As you seem to have good experience of i3, would you be interested in writing something about it?

In reply to by Shawn McCool (not verified)

We need an informative, well-written article on "i3". Please.

That would be great. Perhaps Shawn, above, who seem to have experience of i3 could write it?

In reply to by robertservice (not verified)

Minimal? How about evilwm. If you want full keyboard control look at ratpoison. Both these are amazing wms without much RAM. They were my go-to environments for the best part of a decade. So reliable, so stable.

Been usng i3 since three years and am still delighted. It's a tiling wm, rock-stable, with a pristine documentation, textfile configuration (i.e., no lua, no haskell) and kept expressly unbloated.

As world seems to be moving away from X11, it has a very usable Wayland counterpart, sway wm, which runs upon an existing i3-configuration, although on Wayland. Sway is already present in most of the mainstream Linux distros.

Thank you for this article about this window manager.
I downloaded 'dwm', tried it, modified it, finally adapted it to my needs and I like it. It's fast, simple and lightweight.
I had to adapt the tag selecting 'XKEYS' to my 'azerty' keyboard (French) and I can use 12 tags instead of 9 using the function keys (F1-F12). Now I'm interested in other 'suckless' tools like 'st' and 'dmenu'. ;o)

Yes I got hooked as well. Running both st and dmenu. Dmenu is quite necessary for my workflow.

In reply to by Philippe Marechal (not verified)

I like PekWM or Openbox when going minimal but keeping a panel. I tried I3 but couldn't get past the tiling setup. I'll have to play with DWM and see if I might like its layout handling. Thank you for the article!

I just ditched KDE/Gnome and Im for a year i3wm as DE.

I might end up trying Dwm too. Not that interested for now, tough! haha

github.com/vegangaro/dotfiles

I've tried almost all of the other DE's / WM's and I keep coming back to dwm. The reasons are simple: it's small, it stays out of the way, and I haven't found anything that works as well with multiple monitors out of the box.

Once I understood that I spend my time on a computer to use applications / the terminal and not the DE / WM, dwm "just made sense" to me. i3 would be my next choice if dwm didn't exist.

If you feel the need to continuously tweak your desktop, dwm might not be for you. For myself, I'm happy with one setup that I propagate to all of my other computers. dwm remains useful regardless of how powerful or weak of a machine I put it on.
Guang Yu

Exactly, I easily and quickly use the same configurations on all my computers with dwm. With others I had to go through all manual steps to get the same look and feel all across.

In reply to by yucha electronics

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.