20

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?

3 Answers 3

34

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.

6
  • 1
    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.
    – Animesh D
    Commented Feb 23, 2013 at 21:35
  • Thank you for that link too. It makes up for a lot of confusion I had this evening.
    – Animesh D
    Commented Feb 23, 2013 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. :)
    – Animesh D
    Commented Feb 23, 2013 at 22:00
  • Heh. You might want to rebind that...
    – jasonwryan
    Commented Feb 23, 2013 at 22:02
  • 3
    Ah, your explanation is so wonderfully clear - and now I'm loving this feature! The tutorial on suckless.org says "To move a terminal to master or stack, press [Alt]+[d] or [Alt]+[i]." which is a really bizarre/misleading explanation of this functionality. (I had pressed Alt+i so many times that it took many presses of Alt-d before I could even see the clients returning to the stack!) Commented Mar 17, 2017 at 21:32
3

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.

1
  • finally. you answer is a winner of internet!
    – holms
    Commented Oct 16, 2013 at 14:43
-6

: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

2
  • 6
    Those bindings are for vim, not dwm...
    – jasonwryan
    Commented Nov 6, 2013 at 6:32
  • wtf is this :D :D
    – holms
    Commented Mar 6, 2017 at 0:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .