summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.html960
-rw-r--r--xmobar.css88
2 files changed, 1048 insertions, 0 deletions
diff --git a/README.html b/README.html
new file mode 100644
index 0000000..2fb6a16
--- /dev/null
+++ b/README.html
@@ -0,0 +1,960 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><title
+ >Xmobar - A Minimalistic Text Based Status Bar</title
+ ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
+ /><meta name="generator" content="pandoc"
+ /><meta name="author" content="Andrea Rossato"
+ /><style type="text/css"
+ >
+ol.decimal { list-style-type: decimal; }
+</style
+ ><link rel="stylesheet" href="xmobar.css" type="text/css" media="all" />
+</head
+ ><body
+ ><h1 class="title"
+ >Xmobar - A Minimalistic Text Based Status Bar</h1
+ ><div id="toc"
+ ><ul
+ ><li
+ ><a href="#about" id="TOC-about"
+ >About</a
+ ></li
+ ><li
+ ><a href="#download" id="TOC-download"
+ >Download</a
+ ></li
+ ><li
+ ><a href="#installation" id="TOC-installation"
+ >Installation</a
+ ></li
+ ><li
+ ><a href="#configuration" id="TOC-configuration"
+ >Configuration</a
+ ><ul
+ ><li
+ ><a href="#quick-start" id="TOC-quick-start"
+ >Quick Start</a
+ ></li
+ ><li
+ ><a href="#command-line-options" id="TOC-command-line-options"
+ >Command Line Options</a
+ ></li
+ ><li
+ ><a href="#the-output-template" id="TOC-the-output-template"
+ >The Output Template</a
+ ></li
+ ><li
+ ><a href="#the-commands-configuration-option" id="TOC-the-commands-configuration-option"
+ >The <code
+ >commands</code
+ > Configuration Option</a
+ ></li
+ ><li
+ ><a href="#system-monitor-plugins" id="TOC-system-monitor-plugins"
+ >System Monitor Plugins</a
+ ></li
+ ><li
+ ><a href="#monitor-plugins-commands-arguments" id="TOC-monitor-plugins-commands-arguments"
+ >Monitor Plugins Commands Arguments</a
+ ></li
+ ><li
+ ><a href="#executing-external-commands" id="TOC-executing-external-commands"
+ >Executing External Commands</a
+ ></li
+ ><li
+ ><a href="#other-plugins" id="TOC-other-plugins"
+ >Other Plugins</a
+ ></li
+ ></ul
+ ></li
+ ><li
+ ><a href="#plugins" id="TOC-plugins"
+ >Plugins</a
+ ><ul
+ ><li
+ ><a href="#writing-a-plugin" id="TOC-writing-a-plugin"
+ >Writing a Plugin</a
+ ></li
+ ><li
+ ><a href="#installingremoving-a-plugin" id="TOC-installingremoving-a-plugin"
+ >Installing/Removing a Plugin</a
+ ></li
+ ></ul
+ ></li
+ ><li
+ ><a href="#credits" id="TOC-credits"
+ >Credits</a
+ ></li
+ ><li
+ ><a href="#useful-links" id="TOC-useful-links"
+ >Useful links</a
+ ></li
+ ><li
+ ><a href="#author" id="TOC-author"
+ >Author</a
+ ></li
+ ><li
+ ><a href="#legal" id="TOC-legal"
+ >Legal</a
+ ></li
+ ></ul
+ ></div
+ ><h2 id="about"
+ ><a href="#TOC-about"
+ >About</a
+ ></h2
+ ><p
+ ><a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ > is a minimalistic, text based, status bar.</p
+ ><p
+ >It was inspired by the Ion3 status bar, and supports similar features, like dynamic color management, output templates, and extensibility through plugins.</p
+ ><p
+ >See <code
+ >xmobar.config-sample</code
+ >, distributed with the source code, for a sample configuration.</p
+ ><h2 id="download"
+ ><a href="#TOC-download"
+ >Download</a
+ ></h2
+ ><p
+ >You can get the <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ > source code from <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Hackage</a
+ >.</p
+ ><p
+ >To get the darcs source run:</p
+ ><pre
+ ><code
+ > darcs get http://code.haskell.org/xmobar/
+</code
+ ></pre
+ ><p
+ >The latest binary can be found here:</p
+ ><pre
+ ><code
+ > http://code.haskell.org/~arossato/xmobar/xmobar-0.8.bin
+</code
+ ></pre
+ ><p
+ >A recent screen shot can be found here:</p
+ ><pre
+ ><code
+ > http://code.haskell.org/~arossato/xmobar/xmobar-0.8.png
+</code
+ ></pre
+ ><h2 id="installation"
+ ><a href="#TOC-installation"
+ >Installation</a
+ ></h2
+ ><p
+ >To install simply run:</p
+ ><pre
+ ><code
+ > tar xvfz xmobar-0.8
+ cd xmobar-0.8
+ runhaskell Setup.lhs configure --prefix=/usr/local
+ runhaskell Setup.lhs build
+ runhaskell Setup.lhs haddock --executables # optional
+ runhaskell Setup.lhs install # possibly to be run as root
+</code
+ ></pre
+ ><p
+ >Run with:</p
+ ><pre
+ ><code
+ > xmobar /path/to/config &amp;
+</code
+ ></pre
+ ><p
+ >or</p
+ ><pre
+ ><code
+ > xmobar &amp;
+</code
+ ></pre
+ ><p
+ >if you have the default configuration file saved as <code
+ >~/.xmobarrc</code
+ ></p
+ ><h2 id="configuration"
+ ><a href="#TOC-configuration"
+ >Configuration</a
+ ></h2
+ ><h3 id="quick-start"
+ ><a href="#TOC-quick-start"
+ >Quick Start</a
+ ></h3
+ ><p
+ >See <code
+ >xmobar.config-sample</code
+ > for an example.</p
+ ><p
+ >For the output template:</p
+ ><ul
+ ><li
+ ><p
+ ><code
+ >%command%</code
+ > will execute command and print the output. The output may contain markups to change the characters' color.</p
+ ></li
+ ><li
+ ><p
+ ><code
+ >&lt;fc=#FF0000&gt;string&lt;/fc&gt;</code
+ > will print <code
+ >string</code
+ > with <code
+ >#FF0000</code
+ > color (red).</p
+ ></li
+ ></ul
+ ><p
+ >Other configuration options:</p
+ ><dl
+ ><dt
+ ><code
+ >font</code
+ ></dt
+ ><dd
+ ><p
+ >Name of the font to be used</p
+ ></dd
+ ><dt
+ ><code
+ >bgColor</code
+ ></dt
+ ><dd
+ ><p
+ >Backgroud color</p
+ ></dd
+ ><dt
+ ><code
+ >fgColor</code
+ ></dt
+ ><dd
+ ><p
+ >Default font color</p
+ ></dd
+ ><dt
+ ><code
+ >position</code
+ ></dt
+ ><dd
+ ><p
+ >Top, Bottom or Static (with x, y, width and height)</p
+ ></dd
+ ><dt
+ ><code
+ >commands</code
+ ></dt
+ ><dd
+ ><p
+ >For setting the options of the programs to run (optional)</p
+ ></dd
+ ><dt
+ ><code
+ >sepChar</code
+ ></dt
+ ><dd
+ ><p
+ >The character to be used for indicating commands in the output template (default '%')</p
+ ></dd
+ ><dt
+ ><code
+ >alignSep</code
+ ></dt
+ ><dd
+ ><p
+ >a 2 character string for aligning text in the output template. The text before the first character will be align to left, the text in between the 2 characters will be centered, and the text after the second character will be align to the right.</p
+ ></dd
+ ><dt
+ ><code
+ >template</code
+ ></dt
+ ><dd
+ ><p
+ >The output template</p
+ ></dd
+ ></dl
+ ><h3 id="command-line-options"
+ ><a href="#TOC-command-line-options"
+ >Command Line Options</a
+ ></h3
+ ><p
+ ><a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ > can be either configured with a configuration file or with command line options. In the second case, the command line options will overwrite the corresponding options set in the configuration file.</p
+ ><p
+ >Example:</p
+ ><pre
+ ><code
+ >xmobar -B white -a right -F blue -t '%LIPB%' -c '[Run Weather &quot;LIPB&quot; [] 36000]'
+</code
+ ></pre
+ ><p
+ >This is the list of command line options (the output of xmobar --help):</p
+ ><pre
+ ><code
+ >Usage: xmobar [OPTION...] [FILE]
+Options:
+ -h, -? --help This help
+ -V --version Show version information
+ -f font name --font=font name The font name
+ -B bg color --bgcolor=bg color The background color. Default black
+ -F fg color --fgcolor=fg color The foreground color. Default grey
+ -o --top Place Xmobar at the top of the screen
+ -b --bottom Place Xmobar at the bottom of the screen
+ -a alignsep --alignsep=alignsep Separators for left, center and right text
+ alignment. Default: '}{'
+ -s char --sepchar=char The character used to separate commands in
+ the output template. Default '%'
+ -t tempate --template=tempate The output template
+ -c commands --commands=commands The list of commands to be executed
+Mail bug reports and suggestions to &lt;andrea.rossato@unibz.it&gt;
+</code
+ ></pre
+ ><h3 id="the-output-template"
+ ><a href="#TOC-the-output-template"
+ >The Output Template</a
+ ></h3
+ ><p
+ >The output template must contain at least one command. <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ > will parse the template and will search for the command to be executed in the <code
+ >commands</code
+ > configuration option. First an <code
+ >alias</code
+ > will be searched (plugins such as Weather or Network have default aliases, see below). After that, the command name will be tried. If a command is found, the arguments specified in the <code
+ >commands</code
+ > list will be used.</p
+ ><p
+ >If no command is found in the <code
+ >commands</code
+ > list, <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ > will ask the operating system to execute a program with the name found in the template. If the execution is not successful an error will be reported.</p
+ ><h3 id="the-commands-configuration-option"
+ ><a href="#TOC-the-commands-configuration-option"
+ >The <code
+ >commands</code
+ > Configuration Option</a
+ ></h3
+ ><p
+ >The <code
+ >commands</code
+ > configuration option is a list of commands information and arguments to be used by <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ > when parsing the output template. Each member of the list consists in a command prefixed by the <code
+ >Run</code
+ > keyword. Each command has arguments to control the way <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ > is going to execute it.</p
+ ><p
+ >The option consists in a list of commands separated by a comma and enclosed by square parenthesis.</p
+ ><p
+ >Example:</p
+ ><pre
+ ><code
+ >[Run Memory [&quot;-t&quot;,&quot;Mem: &lt;usedratio&gt;%&quot;] 10, Run Swap [] 10]
+</code
+ ></pre
+ ><p
+ >to run the Memory monitor plugin with the specified template, and the swap monitor plugin, with default options, every second.</p
+ ><p
+ >The only internal available command is <code
+ >Com</code
+ > (see below Executing External Commands). All other commands are provided by plugins. <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ > comes with some plugins, providing a set of system monitors, a standard input reader, an unix named pipe reade, and a configurable date plugin. These plugins install the following internal commands: <code
+ >Weather</code
+ >, <code
+ >Network</code
+ >, <code
+ >Memory</code
+ >, <code
+ >Swap</code
+ >, <code
+ >Cpu</code
+ >, <code
+ >Battery</code
+ >, <code
+ >Date</code
+ >, <code
+ >StdinReader</code
+ >, and <code
+ >PipeReader</code
+ >.</p
+ ><p
+ >To remove them see below Installing/Removing a Plugin</p
+ ><p
+ >Other commands can be created as plugins with the Plugin infrastructure. See below Writing a Plugin</p
+ ><h3 id="system-monitor-plugins"
+ ><a href="#TOC-system-monitor-plugins"
+ >System Monitor Plugins</a
+ ></h3
+ ><p
+ >This is the description of the system monitor plugins that are installed by default.</p
+ ><p
+ >Each monitor has an <code
+ >alias</code
+ > to be used in the output template. Monitors have default aliases.</p
+ ><p
+ ><code
+ >Weather StationID Args RefreshRate</code
+ ></p
+ ><ul
+ ><li
+ >aliases to the Station ID: so <code
+ >Weather &quot;LIPB&quot; []</code
+ > can be used in template as <code
+ >%LIBP%</code
+ ></li
+ ><li
+ >Args: the argument list (see below)</li
+ ><li
+ >Variables that can be used with the <code
+ >-t</code
+ >/<code
+ >--template</code
+ > argument: <code
+ >station</code
+ >, <code
+ >stationState</code
+ >, <code
+ >year</code
+ >, <code
+ >month</code
+ >, <code
+ >day</code
+ >, <code
+ >hour</code
+ >, <code
+ >wind</code
+ >, <code
+ >visibility</code
+ >, <code
+ >skyCondition</code
+ >, <code
+ >tempC</code
+ >, <code
+ >tempF</code
+ >, <code
+ >dewPoint</code
+ >, <code
+ >rh</code
+ >, <code
+ >pressure</code
+ ></li
+ ><li
+ >Default template: <code
+ >&lt;station&gt;: &lt;tempC&gt;C, rh &lt;rh&gt;% (&lt;hour&gt;)</code
+ ></li
+ ></ul
+ ><p
+ ><code
+ >Network Interface Args RefreshRate</code
+ ></p
+ ><ul
+ ><li
+ >aliases to the interface name: so <code
+ >Network &quot;eth0&quot; []</code
+ > can be used as <code
+ >%eth0%</code
+ ></li
+ ><li
+ >Args: the argument list (see below)</li
+ ><li
+ >Variables that can be used with the <code
+ >-t</code
+ >/<code
+ >--template</code
+ > argument: <code
+ >dev</code
+ >, <code
+ >rx</code
+ >, <code
+ >tx</code
+ ></li
+ ><li
+ >Default template: <code
+ >&lt;dev&gt;: &lt;rx&gt;|&lt;tx&gt;</code
+ ></li
+ ></ul
+ ><p
+ ><code
+ >Memory Args RefreshRate</code
+ ></p
+ ><ul
+ ><li
+ >aliases to <code
+ >memory</code
+ ></li
+ ><li
+ >Args: the argument list (see below)</li
+ ><li
+ >Variables that can be used with the <code
+ >-t</code
+ >/<code
+ >--template</code
+ > argument: <code
+ >total</code
+ >, <code
+ >free</code
+ >, <code
+ >buffer</code
+ >, <code
+ >cache</code
+ >, <code
+ >rest</code
+ >, <code
+ >used</code
+ >, <code
+ >usedratio</code
+ ></li
+ ><li
+ >Default template: <code
+ >Mem: &lt;usedratio&gt;% (&lt;cache&gt;M)</code
+ ></li
+ ></ul
+ ><p
+ ><code
+ >Swap Args RefreshRate</code
+ ></p
+ ><ul
+ ><li
+ >aliases to <code
+ >swap</code
+ ></li
+ ><li
+ >Args: the argument list (see below)</li
+ ><li
+ >Variables that can be used with the <code
+ >-t</code
+ >/<code
+ >--template</code
+ > argument: <code
+ >total</code
+ >, <code
+ >used</code
+ >, <code
+ >free</code
+ >, <code
+ >usedratio</code
+ ></li
+ ><li
+ >Default template: <code
+ >Swap: &lt;usedratio&gt;%</code
+ ></li
+ ></ul
+ ><p
+ ><code
+ >Cpu Args RefreshRate</code
+ ></p
+ ><ul
+ ><li
+ >aliases to <code
+ >cpu</code
+ ></li
+ ><li
+ >Args: the argument list (see below)</li
+ ><li
+ >Variables that can be used with the <code
+ >-t</code
+ >/<code
+ >--template</code
+ > argument: <code
+ >total</code
+ >, <code
+ >user</code
+ >, <code
+ >nice</code
+ >, <code
+ >system</code
+ >, <code
+ >idle</code
+ ></li
+ ><li
+ >Default template: <code
+ >Cpu: &lt;total&gt;</code
+ ></li
+ ></ul
+ ><p
+ ><code
+ >Battery Args RefreshRate</code
+ ></p
+ ><ul
+ ><li
+ >aliases to <code
+ >battery</code
+ ></li
+ ><li
+ >Args: the argument list (see below)</li
+ ><li
+ >Variables that can be used with the <code
+ >-t</code
+ >/<code
+ >--template</code
+ > argument: <code
+ >left</code
+ ></li
+ ><li
+ >Default template: <code
+ >Batt: &lt;left&gt;</code
+ ></li
+ ></ul
+ ><h3 id="monitor-plugins-commands-arguments"
+ ><a href="#TOC-monitor-plugins-commands-arguments"
+ >Monitor Plugins Commands Arguments</a
+ ></h3
+ ><p
+ >These are the arguments that can be used for internal commands in the <code
+ >commands</code
+ > configuration option:</p
+ ><pre
+ ><code
+ >-H number --High=number The high threshold
+-L number --Low=number The low threshold
+-h color number --high=color number Color for the high threshold: es &quot;#FF0000&quot;
+-n color number --normal=color number Color for the normal threshold: es &quot;#00FF00&quot;
+-l color number --low=color number Color for the low threshold: es &quot;#0000FF&quot;
+-t output template --template=output template Output template of the command.
+</code
+ ></pre
+ ><p
+ >Commands' arguments must be set as a list. Es:</p
+ ><pre
+ ><code
+ >Run Weather &quot;EGPF&quot; [&quot;-t&quot;,&quot;&lt;station&gt;: &lt;tempC&gt;C&quot;] 36000
+</code
+ ></pre
+ ><p
+ >In this case <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ > will run the weather monitor, getting information for the weather station ID EGPF (Glasgow Airport, as a homage to GHC) every hour (36000 tenth of seconds), with a template that will output something like:</p
+ ><pre
+ ><code
+ >Glasgow Airport: 16.0C
+</code
+ ></pre
+ ><h3 id="executing-external-commands"
+ ><a href="#TOC-executing-external-commands"
+ >Executing External Commands</a
+ ></h3
+ ><p
+ >In order to execute an external command you can either write the command name in the template, in this case it will be executed without arguments, or you can configure it in the &quot;commands&quot; configuration option list with the Com template command:</p
+ ><p
+ ><code
+ >Com ProgarmName Args Alias RefreshRate</code
+ ></p
+ ><ul
+ ><li
+ >ProgramName: the name of the program</li
+ ><li
+ >Args: the arguments to be passed to the program at execution time</li
+ ><li
+ >Alias: a name to be used in the template. If the alias is en empty string the program name can be used in the template.</li
+ ></ul
+ ><p
+ >Es:</p
+ ><pre
+ ><code
+ > Run Com &quot;uname&quot; [&quot;-s&quot;,&quot;-r&quot;] &quot;&quot; 36000
+</code
+ ></pre
+ ><p
+ >can be used in the output template as <code
+ >%uname%</code
+ ></p
+ ><pre
+ ><code
+ > Run Com &quot;date&quot; [&quot;+\&quot;%a %b %_d %H:%M\&quot;&quot;] &quot;mydate&quot; 600
+</code
+ ></pre
+ ><p
+ >can be used in the output template as <code
+ >%mydate%</code
+ ></p
+ ><h3 id="other-plugins"
+ ><a href="#TOC-other-plugins"
+ >Other Plugins</a
+ ></h3
+ ><p
+ ><code
+ >Date Args Alias RefreshRate</code
+ ></p
+ ><p
+ ><code
+ >StdinReader</code
+ ></p
+ ><p
+ ><code
+ >PipeReader &quot;/path/to/pipe&quot; Alias</code
+ ></p
+ ><h2 id="plugins"
+ ><a href="#TOC-plugins"
+ >Plugins</a
+ ></h2
+ ><h3 id="writing-a-plugin"
+ ><a href="#TOC-writing-a-plugin"
+ >Writing a Plugin</a
+ ></h3
+ ><p
+ >Writing a plugin for <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ > should be very simple. You need to create a data type with at least one constructor.</p
+ ><p
+ >Next you must declare this data type an instance of the <code
+ >Exec</code
+ > class, by defining the 1 needed method (alternatively <code
+ >start</code
+ > or <code
+ >run</code
+ >) and 2 optional ones (alias and rate):</p
+ ><pre
+ ><code
+ > start :: e -&gt; (String -&gt; IO ()) -&gt; IO ()
+ run :: e -&gt; IO String
+ rate :: e -&gt; Int
+ alias :: e -&gt; String
+</code
+ ></pre
+ ><p
+ ><code
+ >start</code
+ > must receive a callback to be used to display the <code
+ >String</code
+ > produced by the plugin. This method can be used for plugins that need to perform asynchronous actions. See <code
+ >Plugins/PipeReader.hs</code
+ > for an example.</p
+ ><p
+ ><code
+ >run</code
+ > can be used for simpler plugins. If you define only <code
+ >run</code
+ > the plugin will be run every second. To overwrite this default you just need to implement <code
+ >rate</code
+ >, which must return the number of tenth of seconds between every successive runs. See <code
+ >Plugins/HelloWorld.hs</code
+ > for an example of a plugin that runs just once, and <code
+ >Plugins/Date.hs</code
+ > for one that implements <code
+ >rate</code
+ >.</p
+ ><p
+ >Notice that Date could be implemented as:</p
+ ><pre
+ ><code
+ > instance Exec Date where
+ alias (Date _ a _) = a
+ start (Date f _ r) = date f r
+
+ date :: String -&gt; Int -&gt; (String -&gt; IO ()) -&gt; IO ()
+ date format r callback = do go
+ where go = do
+ t &lt;- toCalendarTime =&lt;&lt; getClockTime
+ callback $ formatCalendarTime defaultTimeLocale format t
+ tenthSeconds r &gt;&gt; go
+</code
+ ></pre
+ ><p
+ >This implementation is equivalent to the one you can read in <code
+ >Plugins/Date.hs</code
+ >.</p
+ ><p
+ ><code
+ >alias</code
+ > is the name to be used in the output template. Default alias will be the data type constructor.</p
+ ><p
+ >Implementing a plugin requires importing the plugin API (the <code
+ >Exec</code
+ > class definition), that is exported by <code
+ >Plugins.hs</code
+ >. So you just need to import it in your module with:</p
+ ><pre
+ ><code
+ > import Plugins
+</code
+ ></pre
+ ><p
+ >After that your type constructor can be used as an argument for the Runnable type constructor <code
+ >Run</code
+ > in the <code
+ >commands</code
+ > list of the configuration options.</p
+ ><p
+ >This requires importing your plugin into <code
+ >Config.hs</code
+ > and adding you type to the type list in the type signature of <code
+ >Config.runnableTypes</code
+ >.</p
+ ><p
+ >For a very basic example see <code
+ >Plugins/HelloWorld.hs</code
+ > or the other plugins that are distributed with <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ >.</p
+ ><h3 id="installingremoving-a-plugin"
+ ><a href="#TOC-installingremoving-a-plugin"
+ >Installing/Removing a Plugin</a
+ ></h3
+ ><p
+ >Installing a plugin should require 3 steps. Here we are going to install the HelloWorld plugin that comes with <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ >:</p
+ ><ol class="decimal"
+ ><li
+ ><p
+ >import the plugin module in <code
+ >Config.hs</code
+ >, by adding:</p
+ ><pre
+ ><code
+ >import Plugins.HelloWorld
+</code
+ ></pre
+ ></li
+ ><li
+ ><p
+ >add the plugin data type to the list of data types in the type signature of <code
+ >runnableTypes</code
+ > in <code
+ >Config.hs</code
+ >. For instance, for the HelloWorld plugin, change <code
+ >runnableTypes</code
+ > into:</p
+ ><pre
+ ><code
+ >runnableTypes :: (Command,(Monitors,(HelloWorld,())))
+runnableTypes = undefined
+</code
+ ></pre
+ ></li
+ ><li
+ ><p
+ >Rebuild and reinstall <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ >. Now test it with:</p
+ ><pre
+ ><code
+ >xmobar Plugins/helloworld.config
+</code
+ ></pre
+ ></li
+ ></ol
+ ><p
+ >As you may see in the example configuration file, the plugin can be used by adding, in the <code
+ >commands</code
+ > list:</p
+ ><pre
+ ><code
+ > Run HelloWorld
+</code
+ ></pre
+ ><p
+ >and, in the output template, the alias of the plugin:</p
+ ><pre
+ ><code
+ > %helloWorld%
+</code
+ ></pre
+ ><p
+ >That's it.</p
+ ><p
+ >To remove a plugin, just remove its type from the type signature of runnableTypes and remove the imported modules.</p
+ ><p
+ >To remove the system monitor plugin:</p
+ ><ol class="decimal"
+ ><li
+ ><p
+ >remove, from <code
+ >Config.hs</code
+ >, the line</p
+ ><pre
+ ><code
+ >import Plugins.Monitors
+</code
+ ></pre
+ ></li
+ ><li
+ ><p
+ >in <code
+ >Config.hs</code
+ > change</p
+ ><pre
+ ><code
+ > runnableTypes :: (Command,(Monitors,()))
+ runnableTypes = undefined
+</code
+ ></pre
+ ><p
+ >to</p
+ ><pre
+ ><code
+ > runnableTypes :: (Command,())
+ runnableTypes = undefined
+</code
+ ></pre
+ ></li
+ ><li
+ ><p
+ >rebuild <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ >.</p
+ ></li
+ ></ol
+ ><h2 id="credits"
+ ><a href="#TOC-credits"
+ >Credits</a
+ ></h2
+ ><p
+ >Thanks to Robert Manea and Spencer Janssen for their help in understanding how X works. They gave me suggestions on how to solve many problems with <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ >.</p
+ ><p
+ >Thanks to Claus Reinke for make me understand existential types (or at least for letting me think I grasp existential types...;-).</p
+ ><p
+ ><a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ > incorporates patches from: Krzysztof Kosciuszkiewicz, Spencer Janssen, Jens Petersen, Dmitry Kurochkin, and Lennart Kolmodin.</p
+ ><h2 id="useful-links"
+ ><a href="#TOC-useful-links"
+ >Useful links</a
+ ></h2
+ ><p
+ >The <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar"
+ >Xmobar</a
+ > home page</p
+ ><p
+ ><a href="http://gorgias.mine.nu/repos/xmobar/"
+ >Xmobars darcs repository</a
+ ></p
+ ><p
+ >To understand the internal mysteries of Xmobar you may try reading this tutorial <a href="http://www.haskell.org/haskellwiki/X_window_programming_in_Haskell"
+ >on X Window Programming in Haskell</a
+ >.</p
+ ><h2 id="author"
+ ><a href="#TOC-author"
+ >Author</a
+ ></h2
+ ><p
+ >Andrea Rossato</p
+ ><p
+ ><code
+ >andrea.rossato at unibz.it</code
+ ></p
+ ><h2 id="legal"
+ ><a href="#TOC-legal"
+ >Legal</a
+ ></h2
+ ><p
+ >This software is released under a BSD-style license. See LICENSE for more details.</p
+ ><p
+ >Copyright © 2007 Andrea Rossato</p
+ ></body
+ ></html
+>
+
diff --git a/xmobar.css b/xmobar.css
new file mode 100644
index 0000000..3cf46a2
--- /dev/null
+++ b/xmobar.css
@@ -0,0 +1,88 @@
+body {
+ margin: auto;
+ padding-right: 1em;
+ padding-left: 1em;
+ max-width: 50em;
+ border-left: 1px solid black;
+ border-right: 1px solid black;
+ color: black;
+ font-family: Verdana, sans-serif;
+ font-size: 100%;
+ line-height: 140%;
+ color: #333;
+}
+pre {
+ border: 1px dotted gray;
+ background-color: #ccffcc;
+ color: #1111111;
+ padding: 0.5em;
+}
+code {
+ font-family: monospace;
+ font-size: 110%;
+}
+h1 a, h2 a, h3 a, h4 a, h5 a {
+ text-decoration: none;
+ color: #009900;
+}
+h1, h2, h3, h4, h5 { font-family: verdana;
+ font-weight: bold;
+ color: #009900; }
+h1 {
+ font-size: 130%;
+}
+
+h2 {
+ font-size: 110%;
+ border-bottom: 1px dotted black;
+}
+
+h3 {
+ font-size: 95%;
+}
+
+h4 {
+ font-size: 90%;
+ font-style: italic;
+}
+
+h5 {
+ font-size: 90%;
+ font-style: italic;
+}
+
+h1.title {
+ font-size: 150%;
+ font-weight: bold;
+ text-align: left;
+ border: none;
+}
+
+dt code {
+ font-weight: bold;
+}
+dd p {
+ margin-top: 0;
+}
+
+a:link {
+ color: #009900
+ }
+
+a:visited {
+ color: #669966
+ }
+a:hover {
+ color: #669966
+ }
+a:active {
+ color: #009900
+ }
+
+#footer {
+ padding-top: 1em;
+ font-size: 70%;
+ color: gray;
+ text-align: center;
+}
+