pax_global_header 0000666 0000000 0000000 00000000064 12513250503 0014506 g ustar 00root root 0000000 0000000 52 comment=2b165cafcef3ad7f510590fcdbb928ae742ce2f4
xmobar-0.23.1/ 0000775 0000000 0000000 00000000000 12513250503 0013061 5 ustar 00root root 0000000 0000000 xmobar-0.23.1/.gitignore 0000664 0000000 0000000 00000000252 12513250503 0015050 0 ustar 00root root 0000000 0000000 /dist/
/TAGS
/IWlib.hs
/StatFS.hs
/XUtil.hs
/src/IWlib.hs
/src/StatFS.hs
/src/XUtil.hs
/web/index.html
/web/releases.html
/cabal-dev/
.cabal-sandbox
cabal.sandbox.config
xmobar-0.23.1/Setup.lhs 0000775 0000000 0000000 00000000146 12513250503 0014675 0 ustar 00root root 0000000 0000000 #!/usr/bin/env runhaskell
> import Distribution.Simple
> main = defaultMainWithHooks simpleUserHooks
xmobar-0.23.1/license 0000664 0000000 0000000 00000002672 12513250503 0014435 0 ustar 00root root 0000000 0000000 Copyright (c) Andrea Rossato
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the author nor the names of his contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
xmobar-0.23.1/news.md 0000664 0000000 0000000 00000046217 12513250503 0014371 0 ustar 00root root 0000000 0000000 % xmobar - Release notes
## Version 0.23.1 (Apr 14, 2015)
_Bug fixes_
- Vertical alignment for icons, [issue #216]
- Improvements to vertical text alignment, with many thanks to Jan
Palus (see ongoing discussion in [issue #221]).
- Better error handling in `Volume` monitor, [issue #215]
- Compilation with ghc 7.8 and 7.10 (thanks to Edward Tjörnhammar,
see [issue #225]).
[issue #225]: https://github.com/jaor/xmobar/issues/225
[issue #221]: https://github.com/jaor/xmobar/issues/221
[issue #216]: https://github.com/jaor/xmobar/issues/216
[issue #215]: https://github.com/jaor/xmobar/issues/215
## Version 0.23 (Mar 8, 2015)
_New features_
- Xmobar can now use a (semi)transparent background: set it with the
new configuration option `alpha` (thanks to Edward Z. Yang, see
[issue #114]).
- Multiple fonts available by means of the new configuration
parameter `additionalFonts` and the template markers
`...`, by Markus Scherer.
- New variables in `Mem` monitor for available memory as reported by
Linux 3.14 and newer, by Samuli Thomasson.
- New configuration parameters `textOffset` and `iconOffset` (see
discussion in [issue #171] and [issue #201]).
- New template variable `flags` in `MPD` monitor, by Duncan Burke.
[issue #171]: https://github.com/jaor/xmobar/issues/171
[issue #201]: https://github.com/jaor/xmobar/issues/201
[issue #114]: https://github.com/jaor/xmobar/issues/114
_Bug fixes_
- We honour the `-S` (show suffix) monitor flag in `CpuFreq`.
- Better `Weather` parsing of wind direction, by Dino Morelli (see
[pull #212]).
[pull #212]: https://github.com/jaor/xmobar/pull/212
## Version 0.22.1 (Oct 11, 2014)
_Bug fixes_
- Fix compilation in systems that don't need mtl newer than the one
shipped with GHC.
## Version 0.22 (Oct 9, 2014)
_New features_
- New `MarqueePipeReader` plugin by Reto Hablützel.
- `Network` monitor has now adaptive units (`-S` is used now to
switch them on), by Axel Angel.
- `Weather` now offers `dewPointC` and `dewPointF` instead of
`dewPoint`, and the new `windCardinal`, `windAzimuth`, `windMph`
and `windKnots` variables, by Tony Morris.
- Strings in the configuration file can now span multiple lines
using Haskell-style multiline script, thanks to dunric
- Icons can now be also xpm files (if xmobar is compiled with
`with_xpm`), thanks to Alexander Shabalin.
- New `borderWidth` option to set xmobar's boder width, thanks to
Travis Staton.
- Support for multiple Xft fonts, thanks to Phil Xiaojun Hu and
Cedric staub (see [pull request #196]).
- Icon patterns for several monitors, that allow you to specify a
collection of icons to use for successive integer variable values,
thanks to Alexander Shabalin (see [pull request #192] and the
documentation for details).
- Upgrade to libmpd 0.9.
_Bug fixes_
- Much more efficient implementation of the `Locks` plugin, thanks
to Anton Vorontsov (see [pull request #195]).
- Not colorizing total disk size in `DiskU` ([issue #189]).
- Avoiding zombies on click actions, thanks to Phil Xiaojun Hu
([issue #181]).
[issue #181]: https://github.com/jaor/xmobar/issues/181
[issue #189]: https://github.com/jaor/xmobar/issues/189
[pull request #192]: https://github.com/jaor/xmobar/pull/192
[pull request #195]: https://github.com/jaor/xmobar/pull/195
[pull request #196]: https://github.com/jaor/xmobar/pull/196
## Version 0.21 (Jul 1, 2014)
_New features_
- Vertical bar indicators using unicode available for most monitors,
by Eric Mrak.
- `CoreTemp`: support for linux 3.15, by Tomáš Janoušek.
- New `CatInt` monitor, displaying integer values read from a file,
by Nathaniel Wesley Filardo.
- New `` tag for safer input parsing, also by Nathaniel.
- New `UnsafeXMonadLog` monitor (by Eric Mrak) and their xproperty
counterparts, `UnsafeXPropertyLog` and `UnsafeNamedXPropertyLog`.
_Bug fixes_
- `Network` now reports status for ppp connections (see
[issue #89]).
- Fix for very long running `Cpu` monitors, by Robert J Macomber.
[issue #89]: https://github.com/jaor/xmobar/issues/89
## Version 0.20.1 (March 13, 2014)
_New features_
- Back to picking by default the first available screen, with a new
configuration option, `pickBroadest`, for choosing the broadest
(see [issue #158]).
[issue #158]: https://github.com/jaor/xmobar/issues/158
## Version 0.20 (March 10, 2014)
_New features_
- Mouse actions now support multiple buttons, by Marcin Mikołajczyk.
- Non supported monitors are ignored in configuration files (see
[issue #139]), by Adam Vogt.
_Bug fixes_
- `Disk` monitor now ignores non-existent devices (Reto Hablützel).
- `Weather` is now non-blocking and doesn't use curl (Ben Boeckel).
- Fix for `Memory` monitor in 3.14 kernels (Ben Boeckel).
- Fix for infinite loops in `AutoMPD` ([issue #76], [issue #111]).
- More robust AC readings in `BatteryP`.
- Fix for `Top` monitor's readings for processes whose name contains
blanks.
- Fixes for geometry computation on multihead (Dmitry Malikov).
- Fixes for missing XDG configuration (Thiago Negri and James McCoy,
see [issue #133]).
- Compatibility with latest `directory` (1.2.0.2).
[issue #76]: https://github.com/jaor/xmobar/issues/76
[issue #111]: https://github.com/jaor/xmobar/issues/111
[issue #133]: https://github.com/jaor/xmobar/issues/133
[issue #139]: https://github.com/jaor/xmobar/issues/133
## Version 0.19 (October 27, 2013)
As of this release, the old bug tracker at Google code is deprecated.
Please use [Github's tracker] for new bugs.
_New features_
- New monitor `BatteryN`, a variant of `BatteryP` that lets you
specify the name of the monitor in the template.
- Support for configuration file living in `XDG_CONFIG_HOME` (see
[github #99]).
- `Com` uses safer `runInteractiveProcess` instead of spawning a
shell (David McLean). If you're using shell expansion in your
`Com` (e.g. "~/bin/script") here's a workaround: `Run Com
"/bin/bash" ["-c", "~/bin/script"]` (cf. [github #127]).
- New plugin `UnsafeStdinReader` that allows actions from stdin.
Now it's possible to have clickable workspaces!
(Thiago Negri, see [github #125]).
- New monitor configuration option (`-x` or `--nastring`) that allows
specifying what string to display when a monitor is not available
(defaulting to "N/A"). Cf. [github #119].
_Bug fixes_
- Using the width options `-w`, `-m` and `-M` in battery monitors
watts display ([github #118]).
- Using the `-d` option in `CoreTemp` ([github #115])
- Fix for systems not supporting PCRE regular expressions: we use
now BCEs, so regex-compat should be enough everywhere (see
[github #117]).
- Weather monitor: support for stations without name (Sergei
Trofimovich, [issue #65]).
[Github's tracker]: https://github.com/jaor/xmobar/issues
[github #99]: https://github.com/jaor/xmobar/issues/115
[github #115]: https://github.com/jaor/xmobar/issues/115
[github #117]: https://github.com/jaor/xmobar/issues/117
[github #125]: https://github.com/jaor/xmobar/issues/125
[issue #65]: http://code.google.com/p/xmobar/issues/detail?id=65
[github #118]: https://github.com/jaor/xmobar/issues/118
[github #119]: https://github.com/jaor/xmobar/issues/119
[github #127]: https://github.com/jaor/xmobar/issues/127
## Version 0.18 (June 5, 2013)
_New features_
- All extra argument monitors taking a string (e.g. `-O` for
`BatteryP`) accept now template variables (see [github #109] and
[#110]). Thanks to Todd Lunter.
- New battery monitor extra argument, `-i`, for the idle status.
_Bug fixes_
- Safer standard input parsing, avoiding injections.
[github #109]: https://github.com/jaor/xmobar/issues/109
[#110]: https://github.com/jaor/xmobar/issues/110
## Version 0.17 (May 5, 2013)
_New features_
- Icons support: it's now possible to insert bitmaps in the template
(Edward O'Callaghan, Alexander Polakov and Tomáš Janoušek).
- Initial support for reacting to mouse clicks (Alexander Polakov).
- New `TopP` and `BottomP` alignments, taking left and right
paddings (thanks to Dmitry Malikov).
- New `` field for memory monitor (Peter Simons).
- New `allDesktops` and `overrideRedirect` configuration options,
providing dock behaviour in tiling WMs (when set to True and False
respectively). Cf. discussion at [github #105].
- Experimental `-d` (start as a dock) option, may address [github #67]
in some window managers.
_Bug fixes_
- Partial (as reports go) fix for [github #77].
- Safer volume plugin (Dmitry Malikov).
- Battery percentage capped at 100% (RJ Regenold).
[github #67]: https://github.com/jaor/xmobar/issues/67
[github #77]: https://github.com/jaor/xmobar/issues/77
[github #105]: https://github.com/jaor/xmobar/issues/105
## Version 0.16 (Dec 3, 2012)
_New features_
- New monitor `AutoMPD`, which uses asynchronous events to display
MPD status (thanks to Ben Boeckel).
- New monitor `BufferedPipeReader` displaying data from multiple
pipes (thanks to Jochen Keil).
- New monitor `DynNetwork`, which detects the active interface
automatically, by Reto Hablützel
- New monitor, `Locks`, displaying the status of lock keys, by
Patrick Chilton.
- Extension for DBUS signal handling (Jochen Keil)
- Hide/Reveal: one can send signals to xmobar and make it (un)hide
itself (Jochen again).
- `PipeReader`'s default text is now configurable, by Reto Hablützel.
- Dependencies updated to latest mtl and libmpd (thanks to Sergei
Trofimovich).
- Dependencies on the deprecated dbus-core removed in favour of
dbus 0.10 (thanks to Jochen Keil).
- MPris2 now includes genre and composer among its fields.
_Bug fixes_
- `DiskIO` now can report overall activity in all partitions of a device
which is not mounted itself (e.g., sda when sda1, sda3, etc. are
the mounted partitions). Thanks to John Soros. See [github #73].
- `DiskU`, the disk usage monitor, works again correctly on Linux,
instead of randomly crashing every now and then, and reporting
wrong used size.
- When using antialiased fonts, we were causing a memory leak in the
X server by repeatedly allocating colors that, apparently, the
server doesn't know how to get rid of (even when told so!). We're
caching them now and X server memory doesn't grow.
- Compilation errors and warnings with GHC 7.6 removed (thanks to
Raghavendra D Prabhu for his reports in [github #71]).
_Known problems_
Some users have reported problems with xmobar compiled with GHC 7.6 in
ArchLinux: see [github #78] and pointers therein. Please, send
reports of any problems or successes in that regard so that we can fix
any remaining issues. Thanks!
[github #71]: https://github.com/jaor/xmobar/issues/71
[github #73]: https://github.com/jaor/xmobar/issues/73
[github #78]: https://github.com/jaor/xmobar/issues/78
## Version 0.15 (June 4, 2012)
_Incompatible changes_
- `Batt` monitor no longer uses `-c` to specify the charge file: it
should figure things out by itself (cf. [issue 69]).
_New features_
- New command line option, `-C`, that allows *adding* commands to
those specified in the configuration file (Ben Boeckel).
- Dependency on GHC's threaded runtime has been eliminated.
- New MPRIS (versions 1 and 2) monitor, by Artem Tarasov.
- New monitor option `-d` to specify the number of decimal places to
display for float numbers. Defaults to 0. See [issue 58].
- New compilation option `--with_threaded`, to use GHC's threaded
runtime to compile xmobar. Disabled by default (cf. discussion in
[github #36]).
_Bug fixes_
- Stricter build dependencies versioning in cabal file.
- [issue 56] vertical alignment of text improved.
- [issue 64] display of `watts` in `Batt` monitor fixed.
- [issue 69] miscellaneous battery reporting issues.
- [issue 67] compilation in DragonFly.
- DiskIO works also when device path in mtab are symbolic links
to the real device file.
- Wireless monitor honours padding settings for ESSID names.
- CoreTemp monitor fixed for newer kernels ([github #38]).
[issue 56]: http://code.google.com/p/xmobar/issues/detail?id=56
[issue 58]: http://code.google.com/p/xmobar/issues/detail?id=58
[issue 64]: http://code.google.com/p/xmobar/issues/detail?id=64
[issue 67]: http://code.google.com/p/xmobar/issues/detail?id=67
[issue 69]: http://code.google.com/p/xmobar/issues/detail?id=69
[github #36]: https://github.com/jaor/xmobar/issues/36
[github #38]: https://github.com/jaor/xmobar/issues/38
## Version 0.14 (Dec 10, 2011)
_New features_
- New brightness monitor, courtesy of Martin Perner.
- New DateZone plugin, for configurable timezone and localized
datetimes, also by Martin.
- New keyboard layout monitor (Kbd). Yes, by Martin.
- Rewrite of the event handling ([issue 53], [issue 57]), you
guessed it.
- Cpu monitor now also reports `iowait` field ([issue 55]).
- Battery monitor: the full charge file is now settable in the
monitor arguments (olpc systems use `charge_full_design`; see
[issue 62]).
_Bug fixes_
- [issue 45] Fix for crashes with AC status changes in battery monitor.
- [issue 48] The field of Wireless behaves like a percentage.
- [issue 50]/[issue 61]: `MPD` monitor now works with libmpd 0.6.
- [issue 60] Fixes for crashes on power resume for battery monitor.
- Template sections without fields are now correctly displayed.
- Catch errors when reading battery status (Ben Boeckel).
- Compilation issues with ghc 7.x (Sergei Trofimovich).
- Fixes for CoreTemp monitor in new kernels (Norbert Zeh).
- Fix for pulseaudio problems in volume monitor (Martin Perner).
- Fix for parsing errors when a `Run` entry ended in an array
(Martin).
- Fixed compilation in OpenBSD (Ivo van der Sangen).
[issue 45]: http://code.google.com/p/xmobar/issues/detail?id=45
[issue 48]: http://code.google.com/p/xmobar/issues/detail?id=48
[issue 50]: http://code.google.com/p/xmobar/issues/detail?id=50
[issue 53]: http://code.google.com/p/xmobar/issues/detail?id=53
[issue 55]: http://code.google.com/p/xmobar/issues/detail?id=55
[issue 57]: http://code.google.com/p/xmobar/issues/detail?id=57
[issue 60]: http://code.google.com/p/xmobar/issues/detail?id=60
[issue 61]: http://code.google.com/p/xmobar/issues/detail?id=61
[issue 62]: http://code.google.com/p/xmobar/issues/detail?id=62
## Version 0.13 (March 28, 2011)
_New features_
- New `Volume` monitor displaying ALSA soundcards information, by
Thomas Tuegel.
- New `ThermalZone` plugin substituting `Thermal` and using linux's
*sysfs* interface (you need this one if you're using a kernel
version equal to or above 2.6.37). See [issue 44].
- xmobar app new has WM_CLASS, WM_NAME and _NET_WM_PID xprops
([issue 38]).
_Incompatible changes_
- In the process of solving [issue 14], we've broken those
configurations that rely on including alignment separators in the
input fed to `StdinReader`.
- The MPD plugin does not accept host and port options anymore: use
the environment variables MPD_HOST and MPD_PORT instead.
- The `Mail` plugin now takes a second parameter (a string)
specifying its alias. As a side-effect, this solves [issue 30].
_Bug fixes_
- [issue 14] `StdinReader` and other plugins accepting external
input don't get confused anymore when characters from `alignSep`
appear in their input.
- [issue 27] `BottomSize` placement now respects its width argument.
- [issue 28] Compilation in Mac OS X fixed.
- [issue 30] `Mail` plugin can be specified anywhere in commands list.
- [issue 36] Battery monitor now supports non-standard locations of
the `/sys/class/power_supply/AC/online` file.
- [issue 40] Battery monitor now supports the new power_now, that
replaces current_now in linux kernels for v. 2.36 and above.
- [issue 42] More accurate net monitor rates.
- DiskIO, Cpu and MultiCpu monitors are also more accurate now.
- Text is now correctly centered vertically.
- `FullBM` border spec fixed.
[issue 14]: http://code.google.com/p/xmobar/issues/detail?id=14
[issue 27]: http://code.google.com/p/xmobar/issues/detail?id=27
[issue 28]: http://code.google.com/p/xmobar/issues/detail?id=28
[issue 30]: http://code.google.com/p/xmobar/issues/detail?id=30
[issue 36]: http://code.google.com/p/xmobar/issues/detail?id=36
[issue 38]: http://code.google.com/p/xmobar/issues/detail?id=38
[issue 40]: http://code.google.com/p/xmobar/issues/detail?id=40
[issue 42]: http://code.google.com/p/xmobar/issues/detail?id=42
[issue 44]: http://code.google.com/p/xmobar/issues/detail?id=44
## Version 0.12 (Dec 24, 2010)
xmobar has a new [maintainer], a new [website], a new [mailing
list] and uses a new [source code repository].
Many thanks to Andrea Rossato, xmobar's author and maintainer so far,
for creating xmobar in the first place, and for giving me the chance
to become its maintainer. And a big thanks to Ben Boeckel, Petr Rockai
and Norbert Zeh for their patches.
[website]: http://projects.haskell.org/xmobar/
[mailing list]: http://projects.haskell.org/cgi-bin/mailman/listinfo/xmobar
[source code repository]: https://github.com/jaor/xmobar
[maintainer]: http://hacks-galore.org/jao/
_New features_
- Window borders: configuration options `border` and `borderColor`
allow drawing borders around xmobar's window.
- New monitor, `Uptime`, showing the system uptime.
- New monitor argument (`-S`) to enable displaying the `%` symbol in
percentages or other suffixes (e.g., units in Uptime and Network);
the symbol is now never included by default.
- New 'run once' commands, by specifying a 0 refresh rate in `Run
Com` ([issue 26]).
- MPD monitor: updated to libmpd 1.5. New fields `ppos` (playlist
position) and `remaining` (remaining time). New configuration
options to specify MPD's host, user name and password.
- Battery monitor: new `watts` and `timeleft` fields (Petr Rockai),
and specific arguments to control coloring and thresholds of the
former.
- MultiCPU monitor: new `auto*` fields that automatically detect all
present CPUs (Ben Boeckel).
- CpuFreq monitor uses just one decimal digit for GHz values (Petr
Rockai).
- Mail plugin expands paths starting with "~/" (Ben Boeckel). Ditto
MBox.
- Weather monitor now skips not retrieved fields, instead of
displaying a long error message.
- New compilation flag, `all_extensions`.
- Documentation and website updates.
_Bug fixes_
- [issue 23] Wireless monitor is now compatible with iwlib 29.
- [issue 24] Swap monitor's used ratio display fixed.
- [issue 25] Percentages only include `%` if requested using `-P`.
- [issue 31] MPD monitor now respects `-W` argument.
- Fixes in CPU frequency formatting, string alignment and colour
boxes in monitors (Norbert Zeh).
- TopMem and TopProc now use the `-L` and `-H` options correctly for
memory template fields.
- MBox skips non-existent mbox paths instead of hanging.
[issue 23]: http://code.google.com/p/xmobar/issues/detail?id=23
[issue 24]: http://code.google.com/p/xmobar/issues/detail?id=24
[issue 25]: http://code.google.com/p/xmobar/issues/detail?id=25
[issue 26]: http://code.google.com/p/xmobar/issues/detail?id=26
[issue 31]: http://code.google.com/p/xmobar/issues/detail?id=31
xmobar-0.23.1/readme.md 0000664 0000000 0000000 00000170724 12513250503 0014653 0 ustar 00root root 0000000 0000000 % xmobar - a minimalistic status bar
# About
xmobar is a minimalistic, mostly text based, status bar. It was
originally designed and implemented by Andrea Rossato to work with
[xmonad], but it's actually usable with any window-manager.
xmobar was inspired by the [Ion3] status bar, and supports similar
features, like dynamic color management, icons, output templates, and
extensibility through plugins.
This page documents xmobar 0.23.1 (see [release notes]).
[This screenshot] shows xmobar running under [sawfish], with
antialiased fonts. And [this one] is my desktop with [xmonad] and two
instances of xmobar.
[release notes]: http://projects.haskell.org/xmobar/releases.html
[xmonad]: http://xmonad.org
[Ion3]: http://tuomov.iki.fi/software/
[This screenshot]: http://projects.haskell.org/xmobar/xmobar-sawfish.png
[this one]: http://projects.haskell.org/xmobar/xmobar-xmonad.png
# Bug Reports
To submit bug reports you can use the [bug tracker over at Github] or
send mail to our [Mailing list].
Note: the old bug tracker at Google code is deprecated. Please use
Github's for new bugs.
[bug tracker over at Github]: https://github.com/jaor/xmobar/issues
# Installation
## Using cabal-install
Xmobar is available from [Hackage], and you can install it using
`cabal-install`:
cabal install xmobar
See below for a list of optional compilation flags that will enable
some optional plugins. For instance, to install xmobar with all the
bells and whistles, use:
cabal install xmobar --flags="all_extensions"
## From source
If you don't have `cabal-install` installed, you can get xmobar's
source code in a variety of ways:
- From [Hackage]. Just download the latest release from xmobar's
hackage page.
- From [Github]. You can also obtain a tarball in [Github's
downloads page]. You'll find there links to each tagged release.
- From the bleeding edge repo. If you prefer to live dangerously,
just get the latest and greatest (and buggiest, i guess) using
git:
git clone git://github.com/jaor/xmobar
[Github's downloads page]: https://github.com/jaor/xmobar/downloads
If you have cabal installed, you can now use it from within xmobar's
source tree:
cabal install -fall_extensions
Otherwise, run the configure script:
runhaskell Setup.lhs configure
# To enable UTF-8 support run:
runhaskell Setup.lhs configure --flags="with_utf8"
# To enable both XFT and UTF-8 support run:
runhaskell Setup.lhs configure --flags="with_xft"
# To enable all extensions
runhaskell Setup.lhs configure --flags="all_extensions"
Now you can build the source:
runhaskell Setup.lhs build
runhaskell Setup.lhs install # possibly to be run as root
## Optional features
You can configure xmobar to include some optional plugins and
features, which are not compiled by default. To that end, you need to
add one or more flags to either the cabal install command or the
configure setup step, as shown in the examples above.
Extensions need additional libraries (listed below) that will be
automatically downloaded and installed if you're using cabal install.
Otherwise, you'll need to install them yourself.
`with_dbus`
: Enables support for DBUS by making xmobar to publish a service on
the session bus. Requires the [dbus] package.
`with_threaded`
: Uses GHC's threaded runtime. Use this option if xmobar enters a
high-CPU regime right after starting.
`with_utf8`
: UTF-8 support. Requires the [utf8-string] package.
`with_xft`
: Antialiased fonts. Requires the [X11-xft] package. This option
automatically enables UTF-8.
To use XFT fonts you need to use the `xft:` prefix in the `font`
configuration option. For instance:
font = "xft:Times New Roman-10:italic"
Or to have fallback fonts, just separate them by commas:
font = "xft:Open Sans:size=9,WenQuanYi Zen Hei:size=9"
`with_mpd`
: Enables support for the [MPD] daemon. Requires the [libmpd] package.
`with_mpris`
: Enables support for MPRIS v1/v2 protocol.
Requires the [dbus] and [text] packages.
`with_inotify`
: Support for inotify in modern Linux kernels. This option is needed
for the MBox and Mail plugins to work. Requires the [hinotify]
package.
`with_iwlib`
: Support for wireless cards. Enables the Wireless plugin. No Haskell
library is required, but you will need the [iwlib] C library and
headers in your system (e.g., install `libiw-dev` in Debian-based
systems).
`with_alsa`
: Support for ALSA sound cards. Enables the Volume plugin. Requires the
[alsa-mixer] package. To install the latter, you'll need the
[libasound] C library and headers in your system (e.g., install
`libasound2-dev` in Debian-based systems).
`with_datezone`
: Support for other timezones. Enables the DateZone plugin.
Requires [timezone-olson] and [timezone-series] package.
`with_xpm`
: Support for xpm image file format. This will allow loading .xpm files in ``.
Requires the [libXpm] C library.
`all_extensions`
: Enables all the extensions above.
# Running xmobar
You can now run xmobar with:
xmobar /path/to/config &
or
xmobar &
if you have the default configuration file saved as
`$XDG\_CONFIG\_HOME/xmobar/xmobarrc` (defaulting to
`~/.config/xmobar/xmobarrc`), or `~/.xmobarrc`.
## Signal Handling
Since 0.14 xmobar reacts to SIGUSR1 and SIGUSR2:
- After receiving SIGUSR1 xmobar moves its position to the next screen.
- After receiving SIGUSR2 xmobar repositions it self on the current screen.
# Configuration
## Quick Start
See [samples/xmobar.config] for an example.
[samples/xmobar.config]: http://github.com/jaor/xmobar/raw/master/samples/xmobar.config
For the output template:
- `%command%` will execute command and print the output. The output
may contain markups to change the characters' color.
- `string` will print `string` with `#FF0000` color
(red).
- `string` will print `string` with the first font from
`additionalFonts`. The index `0` corresponds to the standard font.
- `` will insert the given bitmap. XPM image
format is also supported when compiled with `--flags="with_xpm"`.
- `````` will execute given command
when clicked with specified buttons. If not specified, button is
equal to 1 (left mouse button). Using old syntax (without backticks
surrounding `command`) will result in `button` attribute being
ignored.
- `` allows the encapsulation of arbitrary text `str` (which
must be `len` `Char`s long, where `len` is encoded as a decimal sequence).
Careful use of this and `UnsafeStdinReader`, for example, permits window
managers to feed xmobar strings with `` tags mixed with un-trusted
content (e.g. window titles). For example, if xmobar is invoked as
```xmobar -c "[Run UnsafeStdinReader]" -t "%UnsafeStdinReader%"```
and receives on standard input the line
```foo/>```
then it will display the text ```foo```,
which, when clicked, will cause `test` to be echoed.
Other configuration options:
`font`
: Name of the font to be used. Use the `xft:` prefix for XFT fonts.
`additionalFonts`
: Haskell-style list of fonts to be used with the `fn`-template.
Use the `xft:` prefix for XFT fonts.
`bgColor`
: Background color.
`fgColor`
: Default font color.
`alpha`
: The transparency. 0 is transparent, 255 is opaque.
`position`
: Top, TopP, TopW, TopSize, Bottom, BottomP, BottomW, BottomSize or Static
(with x, y, width and height).
: TopP and BottomP take 2 arguments: left padding and right padding.
: TopW and BottomW take 2 arguments: an alignment parameter (L for
left, C for centered, R for Right) and an integer for the
percentage width xmobar window will have in respect to the
screen width.
: TopSize and BottomSize take 3 arguments: an alignment parameter, an
integer for the percentage width, and an integer for the minimum pixel
height that the xmobar window will have.
: For example:
: position = BottomW C 75
: to place xmobar at the bottom, centered with the 75% of the screen width.
: Or:
: position = BottomP 120 0
: to place xmobar at the bottom, with 120 pixel indent of the left.
: Or
: position = Static { xpos = 0 , ypos = 0, width = 1024, height = 15 }
: or
: position = Top
`textOffset`
: The vertical offset, in pixels, for the text baseline. If
negative or not given, xmobar will try to center text
vertically.
`iconOffset`
: The vertical offset, in pixels, for icons bottom line. If negative
or not given, xmobar will try to center icons vertically.
`lowerOnStart`
: When True the window is sent the bottom of the window stack initially.
`hideOnStart`
: When set to True the window is initially not mapped, i.e. hidden. It then
can be toggled manually (for example using the dbus interface) or
automatically (by a plugin) to make it reappear.
`allDesktops`
: When set to True (the default), xmobar will tell the window manager
explicitly to be shown in all desktops, by setting
`_NET_WM_DESKTOP` to 0xffffffff.
`overrideRedirect`
: If you're running xmobar in a tiling window manager, you might need
to set this option to `False` so that it behaves as a docked
application. Defaults to `True`.
`pickBroadest`
: When multiple displays are available, xmobar will choose by default
the first one to place itself. With this flag set to `True`
(the default is `False`) it will choose the broadest one
instead.
`persistent`
: When True the window status is fixed i.e. hiding or revealing is not
possible. This option can be toggled at runtime. Defaults to False.
`border`
: TopB, TopBM, BottomB, BottomBM, FullB, FullBM or NoBorder (default).
: TopB, BottomB, FullB take no arguments, and request drawing a
border at the top, bottom or around xmobar's window,
respectively.
: TopBM, BottomBM, FullBM take an integer argument, which is the
margin, in pixels, between the border of the window and the
drawn border.
`borderColor`
: Border color.
`borderWidth`
: Border width in pixels.
`iconRoot`
: Root folder where icons are stored. For
if path start with `"/"`, `"./"` or `"../"` it is interpreted as
it is. Otherwise it will have `iconRoot ++ "/"` prepended to
it. Default is `"."`.
`commands`
: For setting the options of the programs to run (optional).
`sepChar`
: The character to be used for indicating commands in the output
template (default '%').
`alignSep`
: 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.
`template`
: The output template.
### Running xmobar with i3status
xmobar can be used to display information generated by [i3status], a
small program that gathers system information and outputs it in
formats suitable for being displayed by the dzen2 status bar, wmii's
status bar or xmobar's `StdinReader`. See [i3status manual] for
further details.
## Command Line Options
xmobar 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.
Example:
xmobar -B white -a right -F blue -t '%LIPB%' -c '[Run Weather "LIPB" [] 36000]'
This is the list of command line options (the output of
xmobar --help):
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
-A alpha --alpha=alpha The transparency: 0 is transparent, 255 (the default) is opaque
-o --top Place xmobar at the top of the screen
-b --bottom Place xmobar at the bottom of the screen
-d --dock Try to start xmobar as a dock
-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 template --template=template The output template
-i path --iconroot=path Default directory for icon pattern files
-c commands --commands=commands The list of commands to be executed
-C command --add-command=command Add to the list of commands to be executed
-x screen --screen=screen On which X screen number to start
Mail bug reports and suggestions to
## The DBus Interface
When compiled with the optional `with_dbus` flag, xmobar can be
controlled over dbus. All signals defined in [src/Signal.hs] as `data
SignalType` can now be sent over dbus to xmobar. Due to current
limitations of the implementation only one process of xmobar can
acquire the dbus. This is handled on a first-come-first-served basis,
meaning that the first process will get the dbus interface. Other
processes will run without further problems, yet have no dbus
interface.
[src/Signal.hs]: https://github.com/jaor/xmobar/raw/master/src/Signal.hs
- Bus Name: `org.Xmobar.Control`
- Object Path: `/org/Xmobar/Control`
- Member Name: Any of SignalType, e.g. `string:Reveal`
- Interface Name: `org.Xmobar.Control`
An example using the `dbus-send` command line utility:
dbus-send \
--session \
--dest=org.Xmobar.Control \
--type=method_call \
--print-reply \
'/org/Xmobar/Control' \
org.Xmobar.Control.SendSignal \
"string:Toggle 0"
It is also possible to send multiple signals at once:
# send to another screen, reveal and toggle the persistent flag
dbus-send [..] \
"string:ChangeScreen 0" "string:Reveal 0" "string:TogglePersistent"
The `Toggle`, `Reveal`, and `Hide` signals take an additional integer
argument that denotes an initial delay, in tenths of a second, before
the command takes effect.
### Example for using the DBus IPC interface with XMonad
Bind the key which should {,un}map xmobar to a dummy value. This is necessary
for {,un}grabKey in xmonad.
((0, xK_Alt_L ), return ())
Also, install `avoidStruts` layout modifier from `XMonad.Hooks.ManageDocks`
Finally, install these two event hooks (`handleEventHook` in `XConfig`)
`myDocksEventHook` is a replacement for `docksEventHook` which reacts on unmap
events as well (which `docksEventHook` doesn't).
import qualified XMonad.Util.ExtensibleState as XS
data DockToggleTime = DTT { lastTime :: Time } deriving (Eq, Show, Typeable)
instance ExtensionClass DockToggleTime where
initialValue = DTT 0
toggleDocksHook :: Int -> KeySym -> Event -> X All
toggleDocksHook to ks ( KeyEvent { ev_event_display = d
, ev_event_type = et
, ev_keycode = ekc
, ev_time = etime
} ) =
io (keysymToKeycode d ks) >>= toggleDocks >> return (All True)
where
toggleDocks kc
| ekc == kc && et == keyPress = do
safeSendSignal ["Reveal 0", "TogglePersistent"]
XS.put ( DTT etime )
| ekc == kc && et == keyRelease = do
gap <- XS.gets ( (-) etime . lastTime )
safeSendSignal [ "TogglePersistent"
, "Hide " ++ show (if gap < 400 then to else 0)
]
| otherwise = return ()
safeSendSignal s = catchX (io $ sendSignal s) (return ())
sendSignal = withSession . callSignal
withSession mc = connectSession >>= \c -> callNoReply c mc >> disconnect c
callSignal :: [String] -> MethodCall
callSignal s = ( methodCall
( objectPath_ "/org/Xmobar/Control" )
( interfaceName_ "org.Xmobar.Control" )
( memberName_ "SendSignal" )
) { methodCallDestination = Just $ busName_ "org.Xmobar.Control"
, methodCallBody = map toVariant s
}
toggleDocksHook _ _ _ = return (All True)
myDocksEventHook :: Event -> X All
myDocksEventHook e = do
when (et == mapNotify || et == unmapNotify) $
whenX ((not `fmap` (isClient w)) <&&> runQuery checkDock w) refresh
return (All True)
where w = ev_window e
et = ev_event_type e
## The Output Template
The output template must contain at least one command. xmobar will
parse the template and will search for the command to be executed in
the `commands` configuration option. First an `alias` 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 `commands` list will be used.
If no command is found in the `commands` list, xmobar 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.
It's possible to insert in the global templates icon directives of the
form:
which will produce the expected result. Accepted image formats are XBM
and XPM (when `with_xpm` flag is enabled). If path does not start with
`"/"`, `"./"`, `"../"` it will have `iconRoot ++ "/"` prepended to it.
It's also possible to use action directives of the form:
which will be executed when clicked on with specified mouse buttons. This tag
can be nested, allowing different commands to be run depending on button clicked.
## The `commands` Configuration Option
The `commands` configuration option is a list of commands information
and arguments to be used by xmobar when parsing the output template.
Each member of the list consists in a command prefixed by the `Run`
keyword. Each command has arguments to control the way xmobar is going
to execute it.
The option consists in a list of commands separated by a comma and
enclosed by square parenthesis.
Example:
[Run Memory ["-t","Mem: %"] 10, Run Swap [] 10]
to run the Memory monitor plugin with the specified template, and the
swap monitor plugin, with default options, every second. And here's
an example of a template for the commands above using an icon:
template=" "
This example will run "xclock" command when date is clicked:
template="%date%
The only internal available command is `Com` (see below Executing
External Commands). All other commands are provided by plugins. xmobar
comes with some plugins, providing a set of system monitors, a
standard input reader, an Unix named pipe reader, a configurable date
plugin, and much more: we list all available plugins below.
Other commands can be created as plugins with the Plugin
infrastructure. See below.
## System Monitor Plugins
This is the description of the system monitor plugins available in
xmobar. Some of them are only installed when an optional build option
is set: we mention that fact, when needed, in their description.
Each monitor has an `alias` to be used in the output template.
Monitors have default aliases. The sections below describe every
monitor in turn, but before we provide a list of the configuration
options (or *monitor arguments*) they all share.
### Icon patterns
Some monitors allow usage of strings that depend on some integer value
from 0 to 8 by replacing all occurences of `"%%"` with it
(i.e. `""` will be interpreted
as `""` when the value is `3`, also `"%"` is interpreted
as `"%"`, `"%%"` as `"3"`, `"%%%"` as `"3%"`, `"%%%%"` as `"33"` and so on). Essentially
it allows to replace vertical bars with custom icons. For example,
Run Brightness
[ "-t", ""
, "--"
, "--brightness-icon-pattern", ""
] 30
Will display `bright_0.xpm` to `bright_8.xpm` depending on current brightness
value.
### Default Monitor Arguments
Monitors accept a common set of arguments, described in the first
subsection below. In addition, some monitors accept additional options
that are specific to them. When specifying the list of arguments in
your configuration, the common options come first, followed by "--",
followed by any monitor-specific options.
These are the options available for all monitors below:
- `-t` _string_ Output template
- Template for the monitor output. Field names must be enclosed
between pointy brackets (``) and will be substituted by the
computed values. You can also specify the foreground (and
optionally, background) color for a region by bracketing it
between `` (or ``) and
``. The rest of the template is output verbatim.
- Long option: `--template`
- Default value: per monitor (see above).
- `-H` _number_ The high threshold.
- Numerical values higher than _number_ will be displayed with the
color specified by `-h` (see below).
- Long option: `--High`
- Default value: 66
- `-L` _number_ The low threshold.
- Numerical values higher than _number_ and lower than the high
threshold will be displayed with the color specified by `-n`
(see below). Values lower than _number_ will use the `-l` color.
- Long option: `--Low`
- Default value: 33
- `-h` _color_ High threshold color.
- Color for displaying values above the high threshold. _color_ can
be either a name (e.g. "blue") or an hexadecimal RGB (e.g.
"#FF0000").
- Long option: `--high`
- Default: none (use the default foreground).
- `-n` _color_ Color for 'normal' values
- Color used for values greater than the low threshold but lower
than the high one.
- Long option: `--normal`
- Default: none (use the default foreground).
- `-l` _color_ The low threshold color
- Color for displaying values below the low threshold.
- Long option: `--low`
- Default: none (use the default foreground).
- `-S` _boolean_ Display optional suffixes
- When set to a true designator ("True", "Yes" or "On"), optional
value suffixes such as the '%' symbol or optional units will be
displayed.
- Long option: `--suffix`
- Default: False.
- `-p` _number_ Percentages padding
- Width, in number of digits, for quantities representing
percentages. For instance `-p 3` means that all percentages
in the monitor will be represented using 3 digits.
- Long option: `--ppad`
- Default value: 0 (don't pad)
- `-d` _number_ Decimal digits
- Number of digits after the decimal period to use in float values.
- Long option: `--ddigits`
- Default value: 0 (display only integer part)
- `-m` _number_ Minimum field width
- Minimum width, in number of characters, of the fields in the
monitor template. Values whose printed representation is shorter
than this value will be padded using the padding characters
given by the `-c` option with the alignment specified by `-a`
(see below).
- Long option: `--minwidth`
- Default: 0
- `-M` _number_ Maximum field width
- Maximum width, in number of characters, of the fields in the
monitor template. Values whose printed representation is longer
than this value will be truncated.
- Long option: `--maxwidth`
- Default: 0 (no maximum width)
- `-w` _number_ Fixed field width
- All fields will be set to this width, padding or truncating as
needed.
- Long option: `--width`
- Default: 0 (variable width)
- `-c` _string_
- Characters used for padding. The characters of _string_ are used
cyclically. E.g., with `-P +- -w 6`, a field with value "foo"
will be represented as "+-+foo".
- Long option: `--padchars`
- Default value: " "
- `-a` r|l Field alignment
- Whether to use right (r) or left (l) alignment of field values
when padding.
- Long option: `--align`
- Default value: r (padding to the left)
- `-b` _string_ Bar background
- Characters used, cyclically, to draw the background of bars.
For instance, if you set this option to "·.", an empty bar will
look like this: `·.·.·.·.·.`
- Long option: `--bback`
- Default value: ":"
- `-f` _string_ Bar foreground
- Characters used, cyclically, to draw the foreground of bars.
- Long option: `--bfore`
- Default value: "#"
- `-W` _number_ Bar width
- Total number of characters used to draw bars.
- Long option: `--bwidth`
- Default value: 10
- `-x` _string_ N/A string
- String to be used when the monitor is not available
- Long option: `--nastring`
- Default value: "N/A"
Commands' arguments must be set as a list. E.g.:
Run Weather "EGPF" ["-t", ": C"] 36000
In this case xmobar 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:
Glasgow Airport: 16.0C
### `Uptime Args RefreshRate`
- Aliases to `uptime`
- Args: default monitor arguments. The low and high
thresholds refer to the number of days.
- Variables that can be used with the `-t`/`--template` argument:
`days`, `hours`, `minutes`, `seconds`. The total uptime is the
sum of all those fields. You can set the `-S` argument to "True"
to add units to the display of those numeric fields.
- Default template: `Up: d h m`
### `Weather StationID Args RefreshRate`
- Aliases to the Station ID: so `Weather "LIPB" []` can be used in
template as `%LIPB%`
- Thresholds refer to temperature in the selected units
- Args: default monitor arguments
- Variables that can be used with the `-t`/`--template` argument:
`station`, `stationState`, `year`, `month`, `day`, `hour`,
`windCardinal`, `windAzimuth`, `windMph`, `windKnots`,
`visibility`, `skyCondition`, `tempC`, `tempF`,
`dewPointC`, `dewPointF`, `rh`, `pressure`
- Default template: `: C, rh % ()`
- Retrieves weather information from http://weather.noaa.gov.
### `Network Interface Args RefreshRate`
- Aliases to the interface name: so `Network "eth0" []` can be used as
`%eth0%`
- Thresholds refer to velocities expressed in Kb/s
- Args: default monitor arguments, plus:
- `--rx-icon-pattern`: dynamic string for reception rate in `rxipat`.
- `--tx-icon-pattern`: dynamic string for transmission rate in `txipat`.
- Variables that can be used with the `-t`/`--template` argument:
`dev`, `rx`, `tx`, `rxbar`, `rxvbar`, `rxipat`, `txbar`, `txvbar`,
`txipat`. Reception and transmission rates (`rx` and `tx`) are displayed
by default as Kb/s, without any suffixes, but you can set the `-S` to
"True" to make them displayed with adaptive units (Kb/s, Mb/s, etc.).
- Default template: `: KB|KB`
### `DynNetwork Args RefreshRate`
- Active interface is detected automatically
- Aliases to "dynnetwork"
- Thresholds are expressed in Kb/s
- Args: default monitor arguments, plus:
- `--rx-icon-pattern`: dynamic string for reception rate in `rxipat`.
- `--tx-icon-pattern`: dynamic string for transmission rate in `txipat`.
- Variables that can be used with the `-t`/`--template` argument:
`dev`, `rx`, `tx`, `rxbar`, `rxvbar`, `rxipat`, `txbar`, `txvbar`,
`txipat`. Reception and transmission rates (`rx` and `tx`) are displayed
in Kbytes per second, and you can set the `-S` to "True" to make them
displayed with units (the string "Kb/s").
- Default template: `: KB|KB`
### `Wireless Interface Args RefreshRate`
- Aliases to the interface name with the suffix "wi": thus, `Wireless
"wlan0" []` can be used as `%wlan0wi%`
- Args: default monitor arguments, plus:
- `--quality-icon-pattern`: dynamic string for connection quality in `qualityipat`.
- Variables that can be used with the `-t`/`--template` argument:
`essid`, `quality`, `qualitybar`, `qualityvbar`, `qualityipat`
- Thresholds refer to link quality in a `[0, 100]` scale
- Default template: ` `
- Requires the C library [iwlib] (part of the wireless tools suite)
installed in your system. In addition, to activate this plugin you
must pass `--flags="with_iwlib"` during compilation
### `Memory Args RefreshRate`
- Aliases to `memory`
- Args: default monitor arguments, plus:
- `--used-icon-pattern`: dynamic string for used memory ratio in `usedipat`.
- `--free-icon-pattern`: dynamic string for free memory ratio in `freeipat`.
- `--available-icon-pattern`: dynamic string for available memory ratio in `availableipat`.
- Thresholds refer to percentage of used memory
- Variables that can be used with the `-t`/`--template` argument:
`total`, `free`, `buffer`, `cache`, `available`, `used`,
`usedratio`, `usedbar`, `usedvbar`, `usedipat`,
`freeratio`, `freebar`, `freevbar`, `freeipat`,
`availableratio`, `availablebar`, `availablevbar`, `availableipat`
- Default template: `Mem: % (M)`
### `Swap Args RefreshRate`
- Aliases to `swap`
- Args: default monitor arguments
- Thresholds refer to percentage of used swap
- Variables that can be used with the `-t`/`--template` argument:
`total`, `used`, `free`, `usedratio`
- Default template: `Swap: %`
### `Cpu Args RefreshRate`
- Aliases to `cpu`
- Args: default monitor arguments, plus:
- `--load-icon-pattern`: dynamic string for cpu load in `ipat`
- Thresholds refer to percentage of CPU load
- Variables that can be used with the `-t`/`--template` argument:
`total`, `bar`, `vbar`, `ipat`, `user`, `nice`, `system`, `idle`, `iowait`
- Default template: `Cpu: %`
### `MultiCpu Args RefreshRate`
- Aliases to `multicpu`
- Args: default monitor arguments, plus:
- `--load-icon-pattern`: dynamic string for overall cpu load in `ipat`.
- `--load-icon-patterns`: dynamic string for each cpu load in `autoipat`, `ipat{i}`.
This option can be specified several times. nth option
corresponds to nth cpu.
- Thresholds refer to percentage of CPU load
- Variables that can be used with the `-t`/`--template` argument:
`autototal`, `autobar`, `autovbar`, `autoipat`, `autouser`, `autonice`,
`autosystem`, `autoidle`, `total`, `bar`, `vbar`, `ipat`, `user`, `nice`,
`system`, `idle`, `total0`, `bar0`, `vbar0`, `ipat0`, `user0`, `nice0`,
`system0`, `idle0`, ...
The auto* variables automatically detect the number of CPUs on the system
and display one entry for each.
- Default template: `Cpu: %`
### `Battery Args RefreshRate`
- Same as `BatteryP ["BAT0", "BAT1", "BAT2"] Args RefreshRate`.
### `BatteryP Dirs Args RefreshRate`
- Aliases to `battery`
- Dirs: list of directories in `/sys/class/power_supply/` where to
look for the ACPI files of each battery. Example:
`["BAT0","BAT1","BAT2"]`. Only the first 3 directories will be
searched.
- Args: default monitor arguments, plus the following specific ones
(these options, being specific to the monitor, are to be specified
after a `--` in the argument list):
- `-O`: string for AC "on" status (default: "On")
- `-i`: string for AC "idle" status (default: "On")
- `-o`: string for AC "off" status (default: "Off")
- `-L`: low power (`watts`) threshold (default: -12)
- `-H`: high power threshold (default: -10)
- `-l`: color to display power lower than the `-L` threshold
- `-m`: color to display power lower than the `-H` threshold
- `-h`: color to display power higher than the `-H` threshold
- `-p`: color to display positive power (battery charging)
- `-f`: file in `/sys/class/power_supply` with AC info (default:
"AC/online")
- `--on-icon-pattern`: dynamic string for current battery charge
when AC is "on" in `leftipat`.
- `--off-icon-pattern`: dynamic string for current battery charge
when AC is "off" in `leftipat`.
- `--idle-icon-pattern`: dynamic string for current battery charge
when AC is "idle" in `leftipat`.
- Variables that can be used with the `-t`/`--template` argument:
`left`, `leftbar`, `leftvbar`, `leftipat`, `timeleft`, `watts`, `acstatus`
- Default template: `Batt: , % / `
- Example (note that you need "--" to separate regular monitor options from
Battery's specific ones):
Run BatteryP ["BAT0"]
["-t", " (%)",
"-L", "10", "-H", "80", "-p", "3",
"--", "-O", "On - ", "-i", "",
"-L", "-15", "-H", "-5",
"-l", "red", "-m", "blue", "-h", "green"]
600
In the above example, the thresholds before the "--" separator
affect only the `` and `` fields, while those after
the separator affect how `` is displayed. For this monitor,
neither the generic nor the specific options have any effect on
``.
It is also possible to specify template variables in the `-O` and
`-o` switches, as in the following example:
Run BatteryP ["BAT0"]
["-t", ""
, "-L", "10", "-H", "80"
, "-l", "red", "-h", "green"
, "--", "-O", "Charging", "-o", "Battery: %"
] 10
- The "idle" AC state is selected whenever the AC power entering the
battery is zero.
### `BatteryN Dirs Args RefreshRate Alias`
Works like `BatteryP`, but lets you specify an alias for the monitor
other than "battery". Useful in case you one separate monitors for
more than one battery.
### `TopProc Args RefreshRate`
- Aliases to `top`
- Args: default monitor arguments. The low and high
thresholds (`-L` and `-H`) denote, for memory entries, the percent
of the process memory over the total amount of memory currently in
use and, for cpu entries, the activity percentage (i.e., the value
of `cpuN`, which takes values between 0 and 100).
- Variables that can be used with the `-t`/`--template` argument:
`no`, `name1`, `cpu1`, `both1`, `mname1`, `mem1`, `mboth1`,
`name2`, `cpu2`, `both2`, `mname2`, `mem2`, `mboth2`, ...
- Default template: ``
- Displays the name and cpu/mem usage of running processes (`bothn`
and `mboth` display both, and is useful to specify an overall
maximum and/or minimum width, using the `-m`/`-M` arguments. `no` gives
the total number of processes.
### `TopMem Args RefreshRate`
- Aliases to `topmem`
- Args: default monitor arguments. The low and high
thresholds (`-L` and `-H`) denote the percent of the process memory
over the total amount of memory currently in use.
- Variables that can be used with the `-t`/`--template` argument:
`name1`, `mem1`, `both1`, `name2`, `mem2`, `both2`, ...
- Default template: ``
- Displays the name and RSS (resident memory size) of running
processes (`bothn` displays both, and is useful to specify an
overall maximum and/or minimum width, using the `-m`/`-M` arguments.
### `DiskU Disks Args RefreshRate`
- Aliases to `disku`
- Disks: list of pairs of the form (device or mount point, template),
where the template can contain ``, ``, ``, `` or
``, ``, ``, ``, ``,
`` or `` for total, free, used, free percentage and
used percentage of the given file system capacity.
- Thresholds refer to usage percentage.
- Args: default monitor arguments. `-t`/`--template` is ignored. Plus
- `--free-icon-pattern`: dynamic string for free disk space in `freeipat`.
- `--used-icon-pattern`: dynamic string for used disk space in `usedipat`.
- Default template: none (you must specify a template for each file system).
- Example:
DiskU [("/", "/"), ("sdb1", "")]
["-L", "20", "-H", "50", "-m", "1", "-p", "3"]
20
### `DiskIO Disks Args RefreshRate`
- Aliases to `diskio`
- Disks: list of pairs of the form (device or mount point, template),
where the template can contain ``, ``, `` for total,
read and write speed, respectively. There are also bar versions of each:
``, ``, ``,
``, ``, ``,
``, ``, and ``.
- Thresholds refer to speed in b/s
- Args: default monitor arguments. `-t`/`--template` is ignored. Plus
- `--total-icon-pattern`: dynamic string for total disk I/O in ``.
- `--write-icon-pattern`: dynamic string for write disk I/O in ``.
- `--read-icon-pattern`: dynamic string for read disk I/O in ``.
- Default template: none (you must specify a template for each file system).
- Example:
DiskIO [("/", " "), ("sdb1", "")] [] 10
### `ThermalZone Number Args RefreshRate`
- Aliases to "thermaln": so `ThermalZone 0 []` can be used in template
as `%thermal0%`
- Thresholds refer to temperature in degrees
- Args: default monitor arguments
- Variables that can be used with the `-t`/`--template` argument:
`temp`
- Default template: `C`
- This plugin works only on systems with devices having thermal zone.
Check directories in `/sys/class/thermal` for possible values of the
zone number (e.g., 0 corresponds to `thermal_zone0` in that
directory).
- Example:
Run ThermalZone 0 ["-t",": C"] 30
#### `Thermal Zone Args RefreshRate`
- **This plugin is deprecated. Use `ThermalZone` instead.**
- Aliases to the Zone: so `Thermal "THRM" []` can be used in template
as `%THRM%`
- Args: default monitor arguments
- Thresholds refer to temperature in degrees
- Variables that can be used with the `-t`/`--template` argument:
`temp`
- Default template: `Thm: C`
- This plugin works only on systems with devices having thermal zone.
Check directories in /proc/acpi/thermal_zone for possible values.
- Example:
Run Thermal "THRM" ["-t","iwl4965-temp: C"] 50
### `CpuFreq Args RefreshRate`
- Aliases to `cpufreq`
- Args: default monitor arguments
- Thresholds refer to frequency in GHz
- Variables that can be used with the `-t`/`--template` argument:
`cpu0`, `cpu1`, .., `cpuN`
- Default template: `Freq: GHz`
- This monitor requires acpi_cpufreq module to be loaded in kernel
- Example:
Run CpuFreq ["-t", "Freq:|GHz", "-L", "0", "-H", "2",
"-l", "lightblue", "-n","white", "-h", "red"] 50
### `CoreTemp Args RefreshRate`
- Aliases to `coretemp`
- Args: default monitor arguments
- Thresholds refer to temperature in degrees
- Variables that can be used with the `-t`/`--template` argument:
`core0`, `core1`, .., `coreN`
- Default template: `Temp: C`
- This monitor requires coretemp module to be loaded in kernel
- Example:
Run CoreTemp ["-t", "Temp:|C",
"-L", "40", "-H", "60",
"-l", "lightblue", "-n", "gray90", "-h", "red"] 50
### `Volume Mixer Element Args RefreshRate`
- Aliases to the mixer name and element name separated by a colon. Thus,
`Volume "default" "Master" [] 10` can be used as `%default:Master%`.
- Args: default monitor arguments. Also accepts:
- `-O` _string_ On string
- The string used in place of `` when the mixer element
is on. Defaults to "[on]".
- Long option: `--on`
- `-o` _string_ Off string
- The string used in place of `` when the mixer element
is off. Defaults to "[off]".
- Long option: `--off`
- `-C` _color_ On color
- The color to be used for `` when the mixer element
is on. Defaults to "green".
- Long option: `--onc`
- `-c` _color_ Off color
- The color to be used for `` when the mixer element
is off. Defaults to "red".
- Long option: `--offc`
- `--highd` _number_ High threshold for dB. Defaults to -5.0.
- `--lowd` _number_ Low threshold for dB. Defaults to -30.0.
- `--volume-icon-pattern` _string_ dynamic string for current volume in `volumeipat`.
- Variables that can be used with the `-t`/`--template` argument:
`volume`, `volumebar`, `volumevbar`, `volumeipat`, `dB`, `status`
- Note that `dB` might only return 0 on your system. This is known
to happen on systems with a pulseaudio backend.
- Default template: `Vol: % `
- Requires the package [alsa-core] and [alsa-mixer] installed in your
system. In addition, to activate this plugin you must pass
`--flags="with_alsa"` during compilation.
### `MPD Args RefreshRate`
- This monitor will only be compiled if you ask for it using the
`with_mpd` flag. It needs [libmpd] 5.0 or later (available on Hackage).
- Aliases to `mpd`
- Args: default monitor arguments. In addition you can provide
`-P`, `-S` and `-Z`, with an string argument, to represent the
playing, stopped and paused states in the `statei` template field.
The environment variables `MPD_HOST` and `MPD_PORT` are used to configure the
mpd server to communicate with. Also available:
- `lapsed-icon-pattern`: dynamic string for current track position in `ipat`.
- Variables that can be used with the `-t`/`--template` argument:
`bar`, `vbar`, `ipat`, `state`, `statei`, `volume`, `length`,
`lapsed`, `remaining`,
`plength` (playlist length), `ppos` (playlist position),
`flags` (ncmpcpp-style playback mode),
`name`, `artist`, `composer`, `performer`,
`album`, `title`, `track`, `file`, `genre`
- Default template: `MPD: `
- Example (note that you need "--" to separate regular monitor options from
MPD's specific ones):
Run MPD ["-t",
" ()