Suckless dwm hacks & patches

It has been a while since I updated my dwm patches and tools collection. Done now.

I have been using the dwm window manager on Linux and mac for a long time, hacking patches and not updating to HEAD for pretty much the same time.

dwm is simple enough that you can read its 2k sloc in a hour, and from there, hack your own complexity quite easily. Then for sure, you will hook up dwm with some decent companions to deal with volume, backlight, etc.

Patches and contexts

I use dwm on laptops with mac os (xquartz) and linux, either standalone or hooked to external monitor(s).

On small screens, I tend to work fullscreen all the time, eventually taking advantage of the “retina” resolution from my macbook pro to display “side windows” tiled with a smaller font size.

My useless gap patch adds some space around x11 clients to make them easier to identify. In fullscreen mode, both gaps and border are removed.

+-----------------+-------+
|                 |       |
|                 |       |
|                 |       |
|                 +-------|
|                 |       |
|                 |       |
|                 |       |
+-----------------+-------+

With gaps around windows:

+---------------------------+
|+----------------++-------+|
||                ||       ||
||                ||       ||
||                ||       ||
||                |+-------+|
||                |+-------+|
||                ||       ||
||                ||       ||
||                ||       ||
|+----------------++-------+|
+---------------------------+

On larger screen (1920x1080), I mostly use vertical and horizontal tiling, depending on the situation, the screen being large enough to accommodate multiple windows side by side.

On even larger screens, say 2560x1440, the classic tiling mode makes the master area way to far on the left. My centered master allows for two convenient “centered” mode:

centeredmaster

With one client in master:

+------------------------------+
|+--------++--------++--------+|
||        ||        ||        ||
||        ||        ||        ||
||        ||        ||        ||
||  S2    ||   M    ||   S1   ||
||        ||        ||        ||
||        ||        ||        ||
||        ||        ||        ||
||        ||        ||        ||
|+--------++--------++--------+|
+------------------------------+

With two clients in master:

+------------------------------+
|+--------++--------++--------+|
||        ||        ||        ||
||        ||   M1   ||        ||
||        ||        ||        ||
||        |+--------+|        ||
||        |+--------+|        ||
||        ||        ||        ||
||        ||   M2   ||        ||
||        ||        ||        ||
|+--------++--------++--------+|
+------------------------------+

centeredfloatingmaster

With one client in master:

+------------------------------+
|+--------++--------++--------+|
||        ||        ||        ||
||    +------------------+    ||
||    |                  |    ||
||    |                  |    ||
||    |        M         |    ||
||    |                  |    ||
||    +------------------+    ||
||        ||        ||        ||
|+--------++--------++--------+|
+------------------------------+

With two clients in master:

+------------------------------+
|+--------++--------++--------+|
||        ||        ||        ||
||    +--------++--------+    ||
||    |        ||        |    ||
||    |        ||        |    ||
||    |   M1   ||   M2   |    ||
||    |        ||        |    ||
||    +--------++--------+    ||
||        ||        ||        ||
|+--------++--------++--------+|
+------------------------------+

Companions

Suckless projects include dmenu as an application launcher and many other tools, such a simple terminal.

Anselm Garbe announced dwm-utils during slcon2 as a multi-purpose tool to handle display layout, color themes, volume and so on.

For now, since it doesn’t appear to be released yet, I’m relying on:


Images

uselessgaps-dwm.png