Install dwm on Debian:
$ sudo apt-get install suckless-tools xfonts-terminus libx11-dev libxinerama-dev $ cd ~/repo $ git clone http://git.suckless.org/dwm $ cd dwm $ sudo make clean install
Add at the end of ~/.xinitrc
, replace the existing window manager exec line:
while true; do xsetroot -name "$( { cat /proc/loadavg; date +"%a %d %b %H:%M/%I:%M"; } | sed -e 'N;s/\n/ /' )" sleep 5s done & while true; do dwm 2> ~/.dwm.log done
(The status line of the dwm bar is the name of the root window.)
Configuration/customization is done by modifying repo/dwm/config.h
, recompiling, and restarting (Mod-Shift-Q). At minimum, I change these lines:
static const char font[] = "-misc-fixed-*-*-normal-*-10-100-75-75-c-60-iso10646-*"; static const char normbordercolor[] = "#555555"; static const char normbgcolor[] = "#718ba5"; static const char normfgcolor[] = "#ffffff"; static const char selbordercolor[] = "#ff1493"; static const char selbgcolor[] = "#ffc0cb"; static const char selfgcolor[] = "#000000"; static const unsigned int borderpx = 2; /* border pixel of windows */ #define MODKEY Mod4Mask static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL }; static const char *termcmd[] = { "urxvt", NULL }; static const Rule rules[] = { /* xprop(1): * WM_CLASS(STRING) = instance, class * WM_NAME(STRING) = title */ /* class instance title tags mask isfloating monitor */ { NULL, NULL, NULL, 0, False, -1 }, }; static const float mfact = 0.6; /* factor of master area size [0.05..0.95] */
The manual describes basic usage (man dwm
).
A number of patches modify the behavior of dwm. I use pertag.
Install a patch like patch -p1 < dwm-6.1-pertag.diff
and recompile.
© Paul Gorman