Wmii 3.5 Snapshot on OS X

This article will help you get the wmii window manager built and running on OS X. At the time of this writing, the recommend release of wmii is “wmii+ixp-20070516”, which is around version 3.5 or so, and that’s what we’ll be installing.

First, it has two dependencies:

  • dmenu
  • Plan 9 Unix tools

My source files always go in ~/src, so change that path in the examples below to suite your setup.

To build dmenu, perform the following:

1
2
3
4
cd ~/src
wget http://www.suckless.org/download/dmenu-3.2.tar.gz
tar xzvf dmenu-3.2.tar.gz
cd dmenu-3.2
Now, modify “config.mk” and set the PREFIX line to a path that won’t interfere with other packages on your system. I always use ~/sys for my custom compiled stuff (other popular alternatives are “/usr/local” or “/opt”). Remember that the makefile does not expand the “~”, so you have to type out the path (or try $HOME). In my config.mk, the PREFIX line is:
1
PREFIX = /Users/garry/sys
Now simply make like normal:
1
make && make install

Next you want to build the Plan 9 Unix tools, which is stuff like awk, sed, grep, etc… but a set that is consistent across all platforms. This is easy:

1
2
3
4
cd ~/src
wget http://suckless.org/hgtar.rc/9base
tar xzvf 9base
cd 9base-27\:bb17f966e24a # This path changes w/ revision, just tab complete it
Next edit “config.mk” and set PREFIX to what you used above but append “/9” to the end. This is so the sed, awk, grep, etc… binaries won’t conflict with the ones already on your system. I have:
1
PREFIX = /Users/garry/sys/9
Also, important, comment out the “-static” line or else you’ll get linking errors. Now the usual:
1
make && make install

Now we’re ready to build wmii itself:

1
2
3
4
cd ~/src
wget http://www.suckless.org/snaps/wmii+ixp-20070516.tgz
tar xzvf wmii+ixp-20070516.tgz
cd wmii+ixp-20070516
Edit “config.mk” and set the PREFIX line to the same path you put for dmenu above. Also, comment out the “-static” line. Again, the usual:
1
make && make install
Now wmii is completely installed, congrats!

The last thing you need to do is to tell X11 to fire up wmii when it starts; this is done with ~/.xinitrc. Copy the following to your .xinitrc:

1
2
3
export PATH=$HOME/sys/bin:/opt/local/bin:$PATH
export PLAN9=$HOME/sys/9
exec $HOME/sys/bin/wmii

Change the paths appropriately if you did not use ~/sys as your PREFIX when building above. Note the “/opt/local/bin” in the PATH is for MacPorts and is not needed if you don’t have MacPorts installed.

Now you’re ready to rock next time you start X11!

Comments