Awesome 3.4.8 on Slackware

Update April 2012: It has been brought to my attention (Thanks to wildwizard and idnotcrae from LQ) that due to the split of xcb-util into the base package and xcb-util-wm as of version 0.3.8, the tutorial below does NOT work for Awesome 3.4.11. Unfortunately, upgrading the stock xcb-utils on 13.37 breaks a few things and as I no longer run AwesomeWM, I am afraid I am not going to update this tutorial. If someone would like to run Awesome 3.4.11 on Slackware 13.37, please have a look at this thread.

[This tutorial has been tested on Slackware64 13.1, Slackware64 13.37 and Slackware64-current as of 20/06/2011]

Ever since I started using the i3 window manager, I’ve really become a fan of tiling WMs. They are quick, efficient and make good use of your screen space. Having used i3 for a few months, I decided to give AwesomeWM a try. I followed the steps from this guide. What turned out was that things have changed since the publication of the above mentioned guide and now it’s much easier to install Awesome 3.x on Slackware64 13.1 (and -current).

First of all you need to grab the cairo’s slackbuild and source from Slackware’s source/l and recompile it with xcb. In order to achieve it you need to edit cairo.Slackbuild and add the line in bold:

CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--sysconfdir=/etc \
--disable-gtk-doc \
--disable-glitz \
--disable-quartz \
--disable-static \
--enable-xcb \
--disable-win32

Dependencies:

Afterwards, you need to install all the dependencies needed by AwesomeWM: lua, imlib2, libev. They are available from www.slackbuilds.org. Finally, you can grab the source of libxdg form here and create a Slack package. You can either do it manually, or use src2pkg. Once a libxdg package is created in /tmp, you can install it with the following command:

# installpkg /tmp/libxdg-basedir*.tgz

Awesome

The only thing that’s left is to grab the latest Awesome source, build a package and install it on the system.  There’s, however, one thing you might want to change. The default Awesome source code installs config files to /usr/etc which is against Slackware’s standard filesystem policy.  Normally all the config files in Slackware go to /etc.  We need to make some slight modifications of the code:

1. Untar the source:

tar xvjf  awesome-3.4.8.tar.bz2
cd awesome-3.4.8

2. Open awesomeConfig.cmake with you favourite editor

3. Change the following:

if(DEFINED SYSCONFDIR)
set(SYSCONFDIR ${SYSCONFDIR} CACHE PATH "config directory")
else()
set(SYSCONFDIR ${PREFIX}/etc CACHE PATH "config directory")
endif()

To

if(DEFINED SYSCONFDIR)
set(SYSCONFDIR /etc CACHE PATH "config directory")
else()
set(SYSCONFDIR /etc CACHE PATH "config directory")
endif()

4. Run ‘make’
5. As root:

mkdir /tmp/awesome-3.4.8
make install DESTDIR=/tmp/awesome-3.4.8
cd /tmp/awesome-3.4.8
makepkg -l y -c n /tmp/awesome-3.4.8.tgz
installpkg /tmp/awesome-3.4.8.tgz

The Awesome Window Manager is now installed on your system.
This is an example of Awesome’s xinitrc (taken from the Awesome Slackbuild for 13.0). To add it to xwconfig you need to create xinitrc.awesome and copy it to /etc/X11/xinit/

#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    /usr/bin/xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    /usr/bin/xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    /usr/bin/xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    /usr/bin/xmodmap $usermodmap
fi

exec awesome

That’s it! You can start the Awesome Window Manager.

I shall discuss its configuration in a separate post.

have fun.