BufferedPipeReader: A plugin for temporary data display

This plugin allows to display data from multiple pipes.
New data will always overwrite the currently displayed data.
However, if a timeout is specified, the previous content is restored.

Configuration works like this:
BufferedPipeReader <Alias> [ ( Timeout, "/path/to/fifo/pipe" ), (..), .. ]

If Timeout is set to 0 then the content is persistent, i.e. it will be
reset to any previous value, it will itself become the previous value.

If Timeout is set to a negative value the earth will stop spinning, so
don't do it.
Modularize Window handling functions

These functions are about creation, positioning and property setting of
the xmobar window. An own module does them justice and eases the task of
adding functions for revealing/hiding and toggling the window.
Move signal handler and data types to own module

This is necessary to make SignalType available for other modules without
import loops. This also decoupels the modules and their functionality a
bit more so this is generally a cleaner solution.
Add signals for {show,hid,toggl}ing

Also make them {Read,Show}able which can be useful for printf debugging
and does not hurt otherwise.
Extend the interface so that plugins can send signals

Also: realign methods to look pretty again.
Create signal handler in main and pass it down to the start* functions

This is necessary for setting up the signal callback (trigger) from the
Plugin interface. As another benefit it is now possible to implement the
lowerOnStart config option properly by simply sending a Hide signal in
startLoop.
Add functions for {reveal,hid,toggl}ing the window

Toggling is based is based on the current window status. If unmapped
then reveal else hide.

Sync is necessary or delays might occur.

The functions are called from the event loop when the according signal
is received

When mapping (revealing) the window again we need to set the struts
property again. The easiest way to do this is to call repositionWin.
However, repositionWin needs access to the Config structure which is
available in eventLoop.

Because decomposition wouldn't be easy and I don't want to pass Config
down to showWindow (which would need to return the new Rectangle then)
this is done here.
Cosmetic surgery

Realign methods, remove unnecessary imports and remove clutter
Implement trigger method for BufferedPipeReader Plugin

Using the trigger method activity on a pipe can now cause the window to
appear (reveal) and disappear again after a given timeout. The timeout
for hiding the window is the same as for restoring the pipes content.

The timeout value is given in tenth of seconds.
Bugfix: Replace TVar with TMVar for the old value

This solves a problem when there is only one pipe in place. With a
default value of "" and only one pipe with a timeout the value is
overwritten with "" after the timeout. To prevent this from happening a
TMVar is used which will never be filled if there is only one pipe.
Bugfix: Do not hide the window when toggling is off for this pipe

The window became hidden although the toggling behaviour was set to
False for a particular pipe. This fixes this behaviour and hides the
window only if the configuration option is set to True.
New configuration option "persistent"

When persistent is set to True then xmobar will always be mapped
(revealed) and never be hidden.

The flag is checked in eventLoop and operation to map/unmap windows is
not carried out if persistence is desired.
New SignalType TogglePersistent

By sending a TogglePersistent signal the configuration option
"persistent" can be changed. Thus it is possible to hide or show xmobar
constantly.
Add IPC with DBus as optional build dependency

Not everybody has/wants the DBus library so this can be chosen at
compile time.
Add an initial (working) version of the DBus IPC module
Move safeHead to Plugins.Utils

safeHead is a very general utility function with suits better into a
common Util module.
Move the IsVariant SignalType instance to Signal module

This belongs here, otherwise ghc will complain about orphaned instances
Run the DBus event handler in startCommand

Actually run this stuff
Add sample option for persistent and update option description

Description for lowerOnStart was missing.
Documentation for the DBus Interface