DWM: Even a Caveman can do It!

Out of all the window managers that I’ve tried, DWM really sticks out like the most dumb one. It has nothing built in and is virtually unusable when not patched. The realy beauty of dwm is revelead after the user finetune it and make it perfect for themselves. This very clearly matches my mentality described in [[learnTheHarderThing]] article and perfectly complements my search for absolute minimalism and optimization in my desktop environments.

Patching a C file and then recompiling it sounds extremely scary. I don’t blame you. But as a soon as you realize that its only 2 commands, it becomes way less intimidating. Infact, its so easy, that even a caveman can do it!

I switched to DWM around 2 years ago, and haven’t looked back since. After the initial learning curve, its navigation becomes 2nd nature and its speed is unmatched by any other window manager in existence.

What is it Really?

DWM is made by https://suckless.org and is a super simple and minimal tiling window manager. Its unpatched version is right around 2000 lines of pure C code; it really doesn’t get more minimal that that. The advantage of this approach is that it allows the developers of the app to focus on what actually matters in a window manager, making it code logic basically perfect. The ricing and extra required features are left strictly for the users to decide, giving them an almost overwhelming number of possibilities.

Quick explanation of what a tiling window manager is: You are used to floating window managers, its when the open apps need to be resided by the user manually and constantly overlap each other. A tiling windows manager has a strict pattern of how new windows open, which maximizes used space in the desktop and allows the user to always know where the next window will open. Window residing is done automatically and requires no thinking to fit all the apps in between each other.

My Workflow

Over the years I’ve developed a very robust workflow that, when learned, leads to window management feeling like magic.

My Binds

This is the most unique part of my setup, since the logic behind the binds was made completely by me. There is nothing exactly revolutionary about them, but they follow very strict logic that prevents a very common habit that tiling window managers users have: opening way to many new windows.

I caught myself doing this while I was using both i3 and qtile, which are also well known and respected window managers that require a bit less setup to customize. Opening a new terminal was so much faster then reusing an old, already open one that it lead to cluttered work spaces filled with useless terminals and copies of apps. This didnt feel like a big problem at first, it quickly becomes an issue that lead to frustration. I solve this Issue in an extremely ingenious way; I just make moving windows around easier and opening new ones.

To Resize, its as simple as holding the windows key and pressing h or l depending on which side you are re sizing to. To make the highlighted window take up most space, its as simple as pressing Win + Enter.

Here is the catch, in order to open any app, you must press Win + Shift + keyBind which is only one extra button that needs to be pressed. As simple as this is, it drastically prevents the number of open windows on an almost subconscious level. Im yet to have the problem of window clutter since implementing this little change.

Here is the full list of all of my relevant key binds (expand):

- Mod + Shift + D           : Launch dmenu
- Mod + Shift + Enter       : Launch terminal
- Mod + Shift + B           : Open LibreWolf browser
- Mod + Shift + A           : Launch AI command
- Mod + B                   : Toggle bar
- Mod + J                   : Focus next window
- Mod + K                   : Focus previous window
- Mod + I                   : Increase number of master area windows
- Mod + D                   : Decrease number of master area windows
- Mod + H                   : Decrease master area size
- Mod + L                   : Increase master area size
- Mod + Enter               : Zoom window (make focused window master)
- Mod + Tab                 : Switch to previous workspace
- Mod + Shift + C           : Close current window
- Mod + T                   : Set tiling layout
- Mod + F                   : Set floating layout
- Mod + M                   : Set monocle layout
- Mod + Shift + Space       : Toggle floating mode for window
- Mod + 0                   : View all workspaces
- Mod + Shift + 0           : Tag window to all workspaces
- Mod + ,                   : Focus previous monitor
- Mod + .                   : Focus next monitor
- Mod + Shift + ,           : Move window to previous monitor
- Mod + Shift + .           : Move window to next monitor


# Hardware keys (no modifiers)
- Volume Up                 : Increase audio volume
- Volume Down               : Decrease audio volume
- Mute                      : Toggle audio mute
- Brightness Up             : Increase screen brightness
- Brightness Down           : Decrease screen brightness

# Other utilities
- Mod + Shift + S           : Take a screenshot
- Mod + Shift + L           : Lock screen
- Mod + Ctrl + Shift + L    : Lock screen & suspend
- Mod + Shift + F           : Update & show sfeed in terminal

# Quit
- Mod + Shift + Q             : Quit dwm

# Workspace (Tag) Shortcuts
- Mod + 1-9                   : Switch to workspace 1-9
- Mod + Shift + 1-9           : Move window to workspace 1-9

As you can see, every since one makes perfect sense: you use L to Lock, B for the browser, and A for the AI. You have instant access to any tool you commonly use, but the simplicity or window movement and residing makes you open less of them.

Window Swallowing

A common annoyance in Linux systems is launching graphical apps from a terminal, as it leaves the terminal open without hiding it in any way, and closing it will cause the graphical app to exit. This is an even bigger issue in tiling window managers, since the terminal from which you ran the GUI will take up a significant part of the screen and needs to be dealt with (usually by moving it to an unused work space, where these terminals accumulate over time).

My config solves this issue by intruding window swallowing. Essentially, when the GUI opens, the terminal is hidden and the GUI gets placed in the exact spot where the terminal used to be. When you are done with that app, you can exit it, and the terminal will pop right back up. This setup substantially reduced the amount of windows that need managing and keeps your workspaces a bit more organized

The Downsides

While extremely liberating by giving you virtually infinite extensibility, its initial minimalism can leave most people lost. If you want to benefit from all of beauties of DWM, you must know exactly what you need. I would never recommend to make DWM your first tiling window manager, give those honors to i3wm, its much better for beginners.

If your not sure of which features you need and which you don’t, you are always free to find custom DWM build online and use them instead. I would even recommend you do that, as it will show you everything DWM has to offer without having to set it up yourself from scratch.

Conclusion

Try it out. Whats the worst that can happen.

My Socials

Don’t hesitate to email me!

DWM and how I solved a probmel of too many open windows with 2 simple trciks

2025-10-22