<?php include('HEADER.php'); ?>

<h1>dwm Window Manager</h1>

<p>Install dwm on Debian:</p>

<pre>
$ 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
</pre>

<p>Add at the end of <code>~/.xinitrc</code>, replace the existing window manager exec line:</p>

<pre>while true; do
    xsetroot -name "$( { cat /proc/loadavg; date +"%a %d %b  %H:%M/%I:%M"; } | sed -e 'N;s/\n/  /' )"
    sleep 5s
done &amp;
while true; do
    dwm 2&gt; ~/.dwm.log
done</pre>

<p>(The status line of the dwm bar is the name of the root window.)</p>

<p>Configuration/customization is done by modifying <code>repo/dwm/config.h</code>, recompiling, and restarting (Mod-Shift-Q). At minimum, I change these lines:</p>

<pre>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] */</pre>

<p>The manual describes basic usage (<code>man dwm</code>).</p>

<p>A number of patches modify the behavior of dwm. I use <a href="http://dwm.suckless.org/patches/pertag">pertag</a>.</p>

<p>Install a patch like <code>patch -p1 &lt; dwm-6.1-pertag.diff</code> and recompile.</p>

<?php include('../FOOTER.php'); ?>
