EDIT: As always, there's an arch wiki page for that:
https://wiki.archlinux.org/index.php/Dwm
Well, on Arch the basics are pretty straightforward, you just change your .xinitrc if you're using startx or look for info on how to configure your desktop manager if you're using one.
As for actually compiling dwm, that's straightforward too. Just get its source, configure config.mk to install it somewhere in your home (I put it in ~/usr/bin/ and the manpage in ~/usr/share/man) configure config.h to your liking, make, make install. Then do the same with dmenu (or install it from the arch repos if you don't need to configure that).
Then you need to set up something that sets the status bar text if you want something down there. This is done using xsetroot -name "$message".
The way I do it (but it's very hackish) is to launch dwm from my .xinitrc by sourcing this script with DWM's path as argument.
Code:
#!/bin/bash
dwmmsg () {
read msg
xsetroot -name "$msg"
}
wmpath=$1
shift
msgfile=$HOME/var/run/dwm/message
statusline=$HOME/bin/dwmstatus
defmsg=''
while true; do
if [[ -r "$msgfile" ]]; then
dwmmsg < "$msgfile"
elif [[ -r "$statusline" ]]; then
{ source "$statusline"; } | dwmmsg
else
echo "$defmsg" | dwmmsg
fi
sleep 1
done &
while true; do
"$wmpath"
[[ -e "$HOME/var/run/dwm/loop" ]] || break
done
exit
Note that this uses bash, which is not very portable...
It sources $HOME/bin/statusline to generate my status line every second. Whatever is in $HOME/var/run/dwm/message overrides the status line, and whatever is in $defmsg is the default if the two others somehow don't work. I don't really use that.
It also runs the WM in a loop if the $HOME/var/run/dwm/loop exists, which is handy when I recompile DWM and don't want to kill X when I quit it.
Here's a smaller (untested) version for you, you could simply copypaste that into your .xinitrc (if that's what you use) and configure the three variables at the top.
Code:
#!/bin/sh
dwm=$HOME/usr/bin/dwm
statusline=$HOME/bin/dwmstatus
loopfile=$HOME/var/run/dwm/loop
dwmmsg () {
read msg
xsetroot -name "$msg"
}
while true; do
if [ -r "$statusline" ]; then
{ source "$statusline"; } | dwmmsg
else
echo "$statusline not found" | dwmmsg
fi
sleep 1
done &
while true; do
"$dwm"
[ -e "$loopfile" ] || break
done
exit
and the dwmstatus script I use:
Code:
echo -n \
'Volume: '\
$(amixer sget Master | sed -nr "s/.*\[([-.0-9]*dB)\].*/\1/p" | { amixer sget Master | grep '\[off\]' > /dev/null && sed 's/.*/(&)/' || cat; })\
' | '\
$(date +"%a %b %d %T")
Note that there's something better to set the root window's name (i.e. the status bar contents) that's made in C, so that's less overhead. See:
http://dwm.suckless.org/dwmstatus/