Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I started using dwm today and am trying to wrap my head around it, as OpenBox is my only other exposure to window managers.

As suggested in the official tutorial, I first opened couple of terminals and they all got tiled, with the first terminal being pushed to left, which I understand is the master.

I played with the default keybindings and opened and closed many windows and programs. I spent quite a bit of time trying to get what tags are and how to use them.

After a while came back to tag 1 and see that the windows, though in tiled mode, somehow changed to a horizontal split like this:

image showing dwm

Any and all new windows are added horizontally.

image showing dwm

I don't see any specific keybinding for changing layout of existing windows (like in tmux).

So, how can I get back the default tiling mode where master is on left and stacks are on right?

share|improve this question
up vote 10 down vote accepted

You have (inadvertently) incremented the windows in master, the default keybind for which is Modi, so that all of your clients in that selected tag are in master.

You can decrement the number of clients in master with Modd. Each press will decrement the clients in master by 1.

It may also be worth pointing out that dwm doesn't use the "desktop" paradigm; whatever layout is applied to the currently visible tag(s) is applied to all tags—hence the "dynamic" in dwm.

This is a powerful concept as it allows you to tag multiple clients, and manipulate those tags (and the associated views) on the fly. Combined with some rules in your config.h, it provides for an incredibly versatile model for managing clients.

See this archived post for an explanation of dwm's tagging/client model.

share|improve this answer
Thank you for the extended explanation. I just figured out those two bindings, but didn't have a clue what I was really doing by pressing alt-i and alt-d repeatedly. Thank you. – Nanda Feb 23 '13 at 21:35
Thank you for that link too. It makes up for a lot of confusion I had this evening. – Nanda Feb 23 '13 at 21:40
I realized what happened, now. I was pressing alt-d every time I wanted to go to the URL bar in chrome and that's what originally caused the issue. :) – Nanda Feb 23 '13 at 22:00
Heh. You might want to rebind that... – jasonwryan Feb 23 '13 at 22:02

Figured it out.

I logged off and logged in again and found that it is working like I wanted it to.

Pressing Alt-i, took me back to horizontal split.

Then, Pressing Alt-d while in horizontal split returned me to the original master - stack split I was looking for.

share|improve this answer
finally. you answer is a winner of internet! – holms Oct 16 '13 at 14:43

:sp-----> for horizontal split
:vs-----> for vertical split
ctrl+ww-> for moving the cursor across the split screen
:q------> for quitting that particular that particular screen

share|improve this answer
Those bindings are for vim, not dwm... – jasonwryan Nov 6 '13 at 6:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.