+<H2><A NAME="SECTION00460000000000000000"></A>
+<A NAME="sec:statusbar"></A>
+<BR>
+<SPAN CLASS="arabic">3</SPAN>.<SPAN CLASS="arabic">6</SPAN> The statusbar
+</H2>
+
+<P>
+The <SPAN CLASS="textit">mod_statusbar</SPAN> module provides a statusbar that adapts to
+layouts of tilings, using only the minimal space needed. Ion only
+supports one adaptive ``status display'' object per screen, so this
+statusbar is mutually exclusive with the embedded mode of <SPAN CLASS="textit">mod_dock</SPAN>
+docks.
+
+<P>
+The statusbar is configured in <SPAN CLASS="textit">cfg_statusbar.lua</SPAN>. Typically,
+the configuration consists of two steps: creating a statusbar with
+<A HREF="node7.html#fn:mod_statusbar.create"><TT>mod_statusbar.create</TT></A>, and then launching the separate
+<TT>ion-statusd</TT> status daemon process with
+<A HREF="node7.html#fn:mod_statusbar.launch_statusd"><TT>mod_statusbar.launch_statusd</TT></A>. This latter phase is done
+automatically, if it was not done by the configuration file, but
+the configuration file may pass extra parameters to <TT>ion-statusd</TT>
+monitors. (See Section <A HREF="node6.html#sec:statusd">5.4</A> for more information on
+writing <TT>ion-statusd</TT> monitors.)
+
+<P>
+A typical <SPAN CLASS="textit">cfg_statusbar.lua</SPAN> configuration might look as follows:
+
+<P>
+<PRE>
+-- Create a statusbar
+mod_statusbar.create{
+ screen = 0, -- First screen,
+ pos = 'bl', -- bottom left corner
+ systray = true, -- Swallow systray windows
+
+ -- The template
+ template = "[ %date || load:% %>load || mail:% %>mail_new/%>mail_total ]"
+ .. " %filler%systray",
+}
+
+-- Launch ion-statusd.
+mod_statusbar.launch_statusd{
+ -- Date meter
+ date={
+ -- ISO-8601 date format with additional abbreviated day name
+ date_format='%a %Y-%m-%d %H:%M',
+ },
+}
+</PRE>
+
+<P>
+
+<H3><A NAME="SECTION00461000000000000000">
+<SPAN CLASS="arabic">3</SPAN>.<SPAN CLASS="arabic">6</SPAN>.<SPAN CLASS="arabic">1</SPAN> The template</A>
+</H3>
+
+<P>
+The template specifies what is shown on the statusbar; for information
+on the other options to <A HREF="node7.html#fn:mod_statusbar.create"><TT>mod_statusbar.create</TT></A>, see the reference.
+Strings of the form `<TT>%spec</TT>' tokens specially interpreter by
+the statusbar; the rest appears verbatim. The <TT>spec</TT> typically
+consists of the name of the value/meter to display (beginning with a latin
+alphabet), but may be preceded by an alignment specifier and a number
+specifying the minimum width. The alignment specifiers are: `<TT>></TT>'
+for right, `<TT><</TT>' for left, and `<TT>|</TT>' for centring. Additionally,
+space following `<TT>%</TT>' (that is, the string `<TT>% </TT>'), adds
+``stretchable space'' at that point. The special string `<TT>%filler</TT>'
+may be used to flush the rest of the template to the right end of
+the statusbar.
+
+<P>
+The stretchable space works as follows: <SPAN CLASS="textit">mod_statusbar</SPAN> remembers
+the widest string (in terms of graphical presentation) that it has
+seen for each meter, unless the width has been otherwise constrained.
+If there is stretchable space in the template, it tries to make the
+meter always take this much space, by stretching any space found in
+the direction indicated by the alignment specifier: the opposite
+direction for left or right alignment, and both for centring.
+
+<P>
+
+<H3><A NAME="SECTION00462000000000000000">
+<SPAN CLASS="arabic">3</SPAN>.<SPAN CLASS="arabic">6</SPAN>.<SPAN CLASS="arabic">2</SPAN> The systray</A>
+</H3>
+
+<P>
+The special `<TT>%systray</TT>' and `<TT>%systray_*</TT>'
+(`<TT>*</TT>' varying) monitors indicate where to place system tray
+windows. There may be multiple of these. KDE-protocol system tray
+icons are placed in `<TT>%systray</TT>' automatically, unless disabled
+with the <TT>systray</TT> option. Otherwise the <TT>statusbar</TT> winprop may
+be used to place any window in any particular `<TT>%systray_*</TT>'.
+
+<P>
+
+<H3><A NAME="SECTION00463000000000000000">
+<SPAN CLASS="arabic">3</SPAN>.<SPAN CLASS="arabic">6</SPAN>.<SPAN CLASS="arabic">3</SPAN> Monitors</A>
+</H3>
+
+<P>
+The part before the first
+underscore of each monitor name, describes the script/plugin/module
+that provides the meter, and any configuration should be passed
+in the a corresponding sub-table <A HREF="node7.html#fn:mod_statusbar.launch_statusd"><TT>mod_statusbar.launch_statusd</TT></A>.
+Ion comes with date, load and mail (for plain old mbox)
+<TT>ion-statusd</TT> monitor scripts. More may be obtained from
+the scripts repository [<A
+ HREF="node12.html#scripts">1</A>]. These included scripts
+provide the following monitors and their options
+
+<P>
+
+<H4><A NAME="SECTION00463100000000000000">
+<SPAN CLASS="arabic">3</SPAN>.<SPAN CLASS="arabic">6</SPAN>.<SPAN CLASS="arabic">3</SPAN>.<SPAN CLASS="arabic">1</SPAN> Date</A>
+</H4>
+
+<P>
+Options: <TT>date_format</TT>: The date format in as seen above,
+in the usual <TT>strftime</TT> format. <TT>formats</TT>: table of
+formats for additional date monitors, the key being the name
+of the monitor (without the `<TT>date_</TT>' prefix).
+
+<P>
+Monitors: `<TT>date</TT>' and other user-specified ones with the
+`<TT>date_</TT>' prefix.
+
+<P>
+
+<H4><A NAME="SECTION00463200000000000000">
+<SPAN CLASS="arabic">3</SPAN>.<SPAN CLASS="arabic">6</SPAN>.<SPAN CLASS="arabic">3</SPAN>.<SPAN CLASS="arabic">2</SPAN> Load</A>
+</H4>
+
+<P>
+Options: <TT>update_interval</TT>: Update interval in milliseconds
+(default 10s). <TT>important_threshold</TT>: Threshold above which
+the load is marked as important (default 1.5), so that the
+drawing engine may be suitably hinted. <TT>critical_threshold</TT>:
+Threshold above which the load is marked as critical (default 4.0).
+
+<P>
+Monitors: `<TT>load</TT>' (for all three values),
+`<TT>load_1min</TT>', `<TT>load_5min</TT>' and `<TT>load_15min</TT>'.
+
+<P>
+
+<H4><A NAME="SECTION00463300000000000000">
+<SPAN CLASS="arabic">3</SPAN>.<SPAN CLASS="arabic">6</SPAN>.<SPAN CLASS="arabic">3</SPAN>.<SPAN CLASS="arabic">3</SPAN> Mail</A>
+</H4>
+
+<P>
+Options: <TT>update_interval</TT>: Update interval in milliseconds
+(default 1min). <TT>mbox</TT>: mbox-format mailbox location
+(default <code>$MAIL</code>).
+<TT>files</TT>: list of additional mailboxes, the key giving the
+name of the monitor.
+
+<P>
+Monitors: `<TT>mail_new</TT>', `<TT>mail_unread</TT>',
+`<TT>mail_total</TT>', and corresponding
+`<TT>mail_*_new</TT>', `<TT>mail_*_unread</TT>', and `<TT>mail_*_total</TT>'
+for the additional mailboxes (`<TT>*</TT>' varying).
+
+<P>
+