Difference between revisions of "Installing xmonad log applet"

From HaskellWiki
Jump to navigation Jump to search
Line 37: Line 37:
 
===Installing haskell dependencies===
 
===Installing haskell dependencies===
 
You need the [http://hackage.haskell.org/package/DBus DBus] package from hackage. If you don't already have it, install the cabal-install tool by following the instructions in the cabal-install section of the
 
You need the [http://hackage.haskell.org/package/DBus DBus] package from hackage. If you don't already have it, install the cabal-install tool by following the instructions in the cabal-install section of the
[http://xmonad.org/intro.html xmonad install page]. Then run <code>cabal update</code> and <code>cabal install DBus</code>.
+
[http://xmonad.org/intro.html xmonad install page]. Then run
  +
cabal update
  +
cabal install DBus
   
 
===Installing the applet===
 
===Installing the applet===

Revision as of 11:03, 19 January 2010

awick has created a gnome-panel applet to read and display xmonad logHook output, which frees gnome-panel users from the need to run an additional status bar to display xmonad information such as workspaces, titles, etc. See xmonad-log-applet for the project home page.

This page explains how to install and configure xmonad-log-applet-1.0 (or the git version which is currently identical but configured to install to locations compatible with ubuntu karmic.)

Distro packages

Currently none AFAIK. (18 Jan 2010)

Preparing for the install

This is a highly experimental application that's seen very little testing. However, it's also small, simple, and unlikely to break other parts of your system. From here on in I'll assume you're comfortable installing unsupported gnome components outside your package manager's control. Unfortunately, so far as I know they must be installed to locations owned by gnome.

To compile the applet you will require a new enough gnu toolchain, libc, some additional C development files, and the applet source. To run it you will need xmonad, xmonad-contrib, ghc, and the hackage DBus package. If you have extremely limited disk space it's possible to build the applet on another host and simply install it on the small device, however that's outside the scope of this discussion.

Choosing an applet version

Typically distros install gnome applets either to a libexec directory or to lib/gnome-applets. If your system uses libexec you will want to use the stable tarball build, if your system (like ubuntu karmic) uses lib/gnome-applets use the git version. For other setups you will need to edit the Makefile.in to match your install paths before running the configure script (see #Installing the applet).

To find your applet path, you can use locate, slocate, find, etc. with some applet you know was installed with your gnome-panel:

then@there $ # this system would use stable build tarball
then@there $ slocate gnome-keyboard-applet
/usr/libexec/gnome-keyboard-applet
now@here $ # this system would use git version
now@here $ locate null_applet
/usr/lib/gnome-applets/null_applet

Get the applet source of your choice by downloading and unpacking the tarball, or git cloning the git tree from the links on the project web page.

Installing C dependencies

Make sure you have a gnu toolchain, i.e. gcc, autotools and friends. (Install build-essential). Also install gnome-panel, libdbus1, libdbus-glib-1, and libpanel-applet-2 if you don't have them already. In debian land the libs will have -dev appended, i.e. libdbus1-dev, etc.

Installing haskell dependencies

You need the DBus package from hackage. If you don't already have it, install the cabal-install tool by following the instructions in the cabal-install section of the xmonad install page. Then run

cabal update
cabal install DBus

Installing the applet

Configuring xmonad to write to the applet

Trouble

Check .xsession-errors for info from gnome-panel, xmonad, dbus, bonobo, etc. Try #xmonad on irc.freenode.net or the xmonad mailing list for help. Please pastebin or attach your xmonad.hs and what version of xmonad/xmonad-contrib you are using.