1. Install the Haskell compiler and the mtl core library.
sudo aptitude install ghc6 sudo aptitude install libghc6-mtl-dev |
2. Download and install the X11 bindings for Haskell
cd /tmp wget http://hackage.haskell.org/packages/archive/X11/1.2.2/X11-1.2.2.tar.gz tar -xzf X11-1.2.2.tar.gz cd X11-1.2.2 runhaskell Setup.hs configure --prefix=$HOME runhaskell Setup.hs build runhaskell Setup.hs install --user cd .. |
3. Download and install the X11-extras bindings
wget http://hackage.haskell.org/packages/archive/X11-extras/0.4/X11-extras-0.4.tar.gz tar -xzf X11-extras-0.4.tar.gz cd X11-extras-0.4 runhaskell Setup.lhs configure --prefix=$HOME runhaskell Setup.lhs build runhaskell Setup.lhs install --user cd .. |
4. Install dmenu and dzen (Optional, provides status bar and menu)
sudo aptitude install dmenu wget http://gotmor.googlepages.com/dzen2-latest.tar.gz tar -xzf dzen2-latest.tar.gz cd dzen2-0.8.5 sudo make clean install cd gadgets sudo make clean install |
5. Download and build Xmonad
mkdir ~/xmonad cd ~/xmonad wget http://hackage.haskell.org/packages/archive/xmonad/0.4/xmonad-0.4.tar.gz tar xzf xmonad-0.4.tar.gz cd xmonad-0.4 runhaskell Setup.lhs configure --prefix=$HOME runhaskell Setup.lhs build runhaskell Setup.lhs install --user |
Note that I have opted to store the xmonad source files in an accessible directory. Dont delete it yet. Any changes in the configuration of Xmonad are made in the source code and then you have to recompile the binary.
The best way to add xmonad to the gdm menu is to create a .xsession file. In the simplest form this will be
#~/.xsession xmonad |
Now when you log in you will have an option titled 'xsession script' and choosing it will launch xmonad. Look at the xmonad site to learn the keyboard shortcuts before you start. We have to configure xmonad to create a space for dzen and write some scripts to pipe some output to the dzen status bar. This and other customizations in the next post.
See my next post for setting up Xmonad.