# Depends on git

# Exit on error:
set -e

git clone git://git.suckless.org/dwmstatus
cd dwmstatus
sed -e '/^PREFIX/s,/usr/local,,' -i config.mk

sed -e 's/KW %W %a %d %b //' \
    -e 's/ %Z %Y//' \
    -e 's/L:%s A:%s U:%s //' \
    -e 's/avgs, tmar, tmutc, //' \
    -i dwmstatus.c

make clean install
cd ..
rm -rf dwmstatus

echo
echo Now you may want to add the following line
echo to the beginning of your ~/.xinirc:
echo dwmstatus 2>&1 > /dev/null &

exit 0
