My dwm

A Dynamic Window Manager

dwm is an extremely fast, small, and dynamic window manager for X. It is written with the suckless philosophy in mind and is objectively one of the best window managers out there.

What my build has to offer

I have patched dwm extensively using official patches but also with the awesome patches Floris Laporte makes for his own build to make the experience more enjoyable. Here are the following patches which I installed:

So that's a nice list... But what does it actually mean? Here are the main points that make my build stand out.

Decentralized keybindings:

So if I have a piece of software that does one thing and does it well, why would I use anything else. I personally use the Simple X Hotkey Daemon (SXHKD) to manage all my keybindings and dwm should be no exception. That's why I use the dwmc patch to allow sxhkd to control dwm.

For this reason, I highly recommend you take a look at my dotfiles repository as it contains my current configuration for sxhkd. This build of dwm is basically unusable until you have sxhkd setup for it. This also means sxhkd should be launched along dwm inside your .xinitrc. As a bonus, if you install this build of dwm with my dotfiles using archer, you can press super + alt + shift + h to view a procedurally generated pdf of all my keybindings.

Window swallowing:

This is a feature which allows terminals to "transform" themselves into the software they are launching (essentially saving screen real estate). For example: If I were to open a video inside mpv from my terminal, the terminal window would disapear and where it once was, mpv would appear.

Aesthetics:

I love transparency and that's why I added the alpha patch to my build. While I was at it, I switched the standard corner square bar indicator for a centered rectangle on each tag using the activetagindicatorbar patch. Most fonts don't play well with it so I added the bar-height patch to make the bar taller. I don't like to have gaps everywhere, but I don't dislike them either. Therefore, I only added them to the tiling layout (which is where they make the most sense).

Emoji Compatibility:

Some Suckless software have a frustrating tendency of crashing when encountering color emoji. This got fixed with the libxft-bgra patch. I'm not the greatest fan of emojis (I personally prefer the fontawesome fonts for icons), but in the unlikely event that one makes it's way to my statusbar, it will not crash.

dwmblocks compatibility:

I personnally have a personal build of dwmblocks which is capable of handling click events. For that to work, I had to add the statuscmd-signal patch.

Accessible stack navigation and manipulation:

I don't want to spend half an hour placing a window where I want in in the stack. I need a suite of functions aiding me to do certain motions either to position windows or navigate through them:

Diverse but consise tiling modes:

I'm not a fan of having so many tiling modes I need a patch just to switch through all of them. I only included those I found usefull on a day to day basis. The following schematics will showcase these (1 being the newest spawned window):

                           Tile (Regular):
┌───────────────────────────────┐┌────────────────────────────────┐
│ 1                             ││ 2                              │
│                               ││                                │
│                               │└────────────────────────────────┘
│                               │┌────────────────────────────────┐
│                               ││ 3                              │
│                               ││                                │
│                               │└────────────────────────────────┘
│                               │┌────────────────────────────────┐
│                               ││ 4                              │
│                               ││                                │
│                               │└────────────────────────────────┘
│                               │┌────────────────────────────────┐
│                               ││ 5                              │
│                               ││                                │
│                               │└────────────────────────────────┘
│                               │┌────────────────────────────────┐
│                               ││ 6                              │
│                               ││                                │
└───────────────────────────────┘└────────────────────────────────┘

                          Centered Master:
┌───────────────┐┌───────────────────────────────┐┌───────────────┐
│ 3             ││ 1                             ││ 2             │
│               ││                               ││               │
└───────────────┘│                               │└───────────────┘
┌───────────────┐│                               │┌───────────────┐
│ 5             ││                               ││ 4             │
│               ││                               ││               │
└───────────────┘│                               │└───────────────┘
┌───────────────┐│                               │┌───────────────┐
│ 7             ││                               ││ 6             │
│               ││                               ││               │
└───────────────┘│                               │└───────────────┘
┌───────────────┐│                               │┌───────────────┐
│ 9             ││                               ││ 8             │
│               ││                               ││               │
└───────────────┘│                               │└───────────────┘
┌───────────────┐│                               │┌───────────────┐
│ 11            ││                               ││ 10            │
│               ││                               ││               │
└───────────────┘└───────────────────────────────┘└───────────────┘

                     Floating Centered Master:
┌───────────────┐┌───────────────┐┌───────────────┐┌───────────────┐
│ 2             ││ 3             ││ 4             ││ 5             │
│               ││               ││               ││               │
│             ┌──────────────────────────────────────┐             │
│             │ 1                                    │             │
│             │                                      │             │
│             │                                      │             │
│             │                                      │             │
│             │                                      │             │
│             │                                      │             │
│             │                                      │             │
│             │                                      │             │
│             │                                      │             │
│             └──────────────────────────────────────┘             │
│               ││               ││               ││               │
│               ││               ││               ││               │
│               ││               ││               ││               │
│               ││               ││               ││               │
│               ││               ││               ││               │
└───────────────┘└───────────────┘└───────────────┘└───────────────┘

                           Gappless Grid:
┌───────────────┐┌───────────────┐┌───────────────┐┌───────────────┐
│ 1             ││ 5             ││ 9             ││ 13            │
│               ││               ││               ││               │
│               ││               ││               ││               │
└───────────────┘└───────────────┘└───────────────┘└───────────────┘
┌───────────────┐┌───────────────┐┌───────────────┐┌───────────────┐
│ 2             ││ 6             ││ 10            ││ 14            │
│               ││               ││               ││               │
│               ││               ││               ││               │
└───────────────┘└───────────────┘└───────────────┘└───────────────┘
┌───────────────┐┌───────────────┐┌───────────────┐┌───────────────┐
│ 3             ││ 7             ││ 11            ││ 15            │
│               ││               ││               ││               │
│               ││               ││               ││               │
└───────────────┘└───────────────┘└───────────────┘└───────────────┘
┌───────────────┐┌───────────────┐┌───────────────┐┌───────────────┐
│ 4             ││ 8             ││ 12            ││ 16            │
│               ││               ││               ││               │
│               ││               ││               ││               │
└───────────────┘└───────────────┘└───────────────┘└───────────────┘

There are 3 more layout which don't require drawings:

Requirements

In order to build dwm you need the Xlib header files.

Installation

Edit config.mk to match your local setup (dwm is installed into the /usr/local namespace by default).

Afterwards enter the following command to build and install dwm (if necessary as root):

    make clean install

Running dwm

Add the following line to your .xinitrc to start dwm using startx:

    exec dwm

Configuration

The configuration of dwm is done by creating a custom config.h and (re)compiling the source code.