packages feed

xmobar 0.25 → 0.26

raw patch · 13 files changed

+849/−804 lines, 13 filesdep +hspecdep ~dbussetup-changed

Dependencies added: hspec

Dependency ranges changed: dbus

Files

+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
− Setup.lhs
@@ -1,4 +0,0 @@-#!/usr/bin/env runhaskell--> import Distribution.Simple-> main = defaultMainWithHooks simpleUserHooks
+ changelog.md view
@@ -0,0 +1,597 @@+## Version 0.26 (April, 2018)++_New features_++  - New options to specify the ellipsis string for fields (`-e`) and+    total width (`-E`), thanks to Olivier Schneider.+  - `MultiCpu`: New option to specify fallback icon paths+    (`--fallback-icon-pattern`), thanks to Reed Koser.++_Bug fixes_++  - `CpuFreq` monitors honours `-d` (number of digits) if no suffix is+    given (cf. [issue #335]).+  - Race condition in network monitor fixed ([issue #347]).+  - Limiting dbus supported version (see [issue #346]).++[issue #335]: https://github.com/jaor/xmobar/issues/335+[issue #346]: https://github.com/jaor/xmobar/issues/346+[issue #347]: https://github.com/jaor/xmobar/issues/347++## Version 0.25 (February, 2018)++_New features_++  - The X11 properties `WM_NAME` and `WM_CLASS` for xmobar windows can+    be setup in either the configuration file (`wmName` and `wmClass`)+    or using the new flags `-n` adn `-w` (see [issue #323]).+  - New flag `with_weather`, to build sans `Weather` monitor.++_Bug fixes_++   - Honouring -x in MPris monitor ([issue #325])+++[issue #323]: https://github.com/jaor/xmobar/issues/323+[issue #325]: https://github.com/jaor/xmobar/issues/325++## Version 0.24.5 (May, 2017)++_Bug fixes_++  - Fix for vertical bars ([issue #303])++[issue #303]: https://github.com/jaor/xmobar/issues/303++## Version 0.24.4 (April, 2017)++_Infrastructure_++  - Whe have now an active [Travis CI setup].++[Travis CI setup]: https://travis-ci.org/jaor/xmobar++_Bug fixes_++  - Reduce wakeups rate via rtsopts V0 (with new flag with_rtsopts to+    disable it) (see [issue #89]).+  - Fix Net monitor for lage uptimes and bytecounts (Tomas Janoušek).+  - Fix MultiCpu monitor for large uptimes (Zev Weiss).+  - Fix compilation when XMP is disabled (Sergi Trofimovich).+  - Better fatal error messages (Michael Bishop).+  - More paths to read from in CoreTemp (see [issue #291]).++[issue #291]: https://github.com/jaor/xmobar/issues/291++## Version 0.24.3 (Sep 5, 2016)++_Bug fixes_++  - Battery monitor: fixes for cases where status is not consistently+    reported by the kernel (see [issue #271]).++[issue #271]: https://github.com/jaor/xmobar/issues/271++## Version 0.24.2 (Aug 8, 2016)++_Bug fixes_++   - New Weather plugin URL (see [issue #270]).++[issue #270]: https://github.com/jaor/xmobar/issues/270++## Version 0.24.1 (Jul 28, 2016)++_Bug fixes_++   - Restoring compatibility with GHC 7.6, (see [issue #269]).++[issue #269]: https://github.com/jaor/xmobar/issues/269++## Version 0.24 (Jul 26, 2016)++_New features_++   - Use the new compilation flag `with_conduit` to compile an+     implemetation of the  `Weather` plugin that will work behind+     proxies, by Dragos Boca.+   - New command line argument (`-p`) to specify xmobar's position, by+     Valentin Shirokov.+   - Wind speed in Km/h and m/s for the `Weather` plugin, by Michael+     Knabe.+   - `UVMeter`, a new optional plugin showing UV data for Australian+     users, by Roman Joost.+   - New template parameter `<date>` for the `MPD` plugin (by Bruno+     Heridet)+   - New monitor argument `-T` to specify the maximum total width of+     the monitor text.+   - New $VAR parameter syntax for using env vars in pipe monitors, by+     Will Song (see [issue #268]).++_Bug fixes_++   - The `Volume` plugin now supports capture devices (Antoine Eiche).+   - The `MPD` plugin will now automatically update on options changes+     (Ben Boeckel).+   - The `Battery` plugin does now a better job at tracking AC status+     and times (see [issue #231]).+   - `PipeReader` was polling too often (thanks to zlbruce).+   - The `MPris` monitor now honours field width and padding optons+     (-M, -w, etc.).+   - `Batt`: sensible thresholds for high/low power consumption (see+     [issue #265]).++[issue #231]: https://github.com/jaor/xmobar/issues/225+[issue #265]: https://github.com/jaor/xmobar/issues/225+[issue #268]: https://github.com/jaor/xmobar/issues/268++## 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+    `<fn=1>...</fn>`, 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 `<raw>` 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 <action> 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 `<freeratio>` 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 <quality> 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
− news.md
@@ -1,579 +0,0 @@-% xmobar - Release notes--## Version 0.25 (February, 2018)--_New features_--  - The X11 properties `WM_NAME` and `WM_CLASS` for xmobar windows can-    be setup in either the configuration file (`wmName` and `wmClass`)-    or using the new flags `-n` adn `-w` (see [issue #323]).-  - New flag `with_weather`, to build sans `Weather` monitor.--_Bug fixes_--   - Honouring -x in MPris monitor ([issue #325])---[issue #323]: https://github.com/jaor/xmobar/issues/323-[issue #325]: https://github.com/jaor/xmobar/issues/325--## Version 0.24.5 (May, 2017)--_Bug fixes_--  - Fix for vertical bars ([issue #303])--[issue #303]: https://github.com/jaor/xmobar/issues/303--## Version 0.24.4 (April, 2017)--_Infrastructure_--  - Whe have now an active [Travis CI setup].--[Travis CI setup]: https://travis-ci.org/jaor/xmobar--_Bug fixes_--  - Reduce wakeups rate via rtsopts V0 (with new flag with_rtsopts to-    disable it) (see [issue #89]).-  - Fix Net monitor for lage uptimes and bytecounts (Tomas Janoušek).-  - Fix MultiCpu monitor for large uptimes (Zev Weiss).-  - Fix compilation when XMP is disabled (Sergi Trofimovich).-  - Better fatal error messages (Michael Bishop).-  - More paths to read from in CoreTemp (see [issue #291]).--[issue #291]: https://github.com/jaor/xmobar/issues/291--## Version 0.24.3 (Sep 5, 2016)--_Bug fixes_--  - Battery monitor: fixes for cases where status is not consistently-    reported by the kernel (see [issue #271]).--[issue #271]: https://github.com/jaor/xmobar/issues/271--## Version 0.24.2 (Aug 8, 2016)--_Bug fixes_--   - New Weather plugin URL (see [issue #270]).--[issue #270]: https://github.com/jaor/xmobar/issues/270--## Version 0.24.1 (Jul 28, 2016)--_Bug fixes_--   - Restoring compatibility with GHC 7.6, (see [issue #269]).--[issue #269]: https://github.com/jaor/xmobar/issues/269--## Version 0.24 (Jul 26, 2016)--_New features_--   - Use the new compilation flag `with_conduit` to compile an-     implemetation of the  `Weather` plugin that will work behind-     proxies, by Dragos Boca.-   - New command line argument (`-p`) to specify xmobar's position, by-     Valentin Shirokov.-   - Wind speed in Km/h and m/s for the `Weather` plugin, by Michael-     Knabe.-   - `UVMeter`, a new optional plugin showing UV data for Australian-     users, by Roman Joost.-   - New template parameter `<date>` for the `MPD` plugin (by Bruno-     Heridet)-   - New monitor argument `-T` to specify the maximum total width of-     the monitor text.-   - New $VAR parameter syntax for using env vars in pipe monitors, by-     Will Song (see [issue #268]).--_Bug fixes_--   - The `Volume` plugin now supports capture devices (Antoine Eiche).-   - The `MPD` plugin will now automatically update on options changes-     (Ben Boeckel).-   - The `Battery` plugin does now a better job at tracking AC status-     and times (see [issue #231]).-   - `PipeReader` was polling too often (thanks to zlbruce).-   - The `MPris` monitor now honours field width and padding optons-     (-M, -w, etc.).-   - `Batt`: sensible thresholds for high/low power consumption (see-     [issue #265]).--[issue #231]: https://github.com/jaor/xmobar/issues/225-[issue #265]: https://github.com/jaor/xmobar/issues/225-[issue #268]: https://github.com/jaor/xmobar/issues/268--## 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-    `<fn=1>...</fn>`, 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 `<raw>` 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 <action> 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 `<freeratio>` 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 <quality> 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
readme.md view
@@ -11,8 +11,6 @@ features, like dynamic color management, icons, output templates, and extensibility through plugins. -This page documents xmobar 0.25 (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.@@ -25,8 +23,7 @@  # Bug Reports -To submit bug reports you can use the [bug tracker over at Github] or-send mail to our [Mailing list].+To submit bug reports you can use the [bug tracker over at Github].  Note: the old bug tracker at Google code is deprecated.  Please use Github's for new bugs.@@ -72,23 +69,10 @@         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:+There is also a barebones `stack.yaml` file that will allow you to+build the xmobar executable with stances of the form: -        runhaskell Setup.lhs build-        runhaskell Setup.lhs install # possibly to be run as root+        stack build --flag xmobar:all_extensions   ## Optional features@@ -102,76 +86,63 @@ 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_dbus` Enables support for DBUS by making xmobar to publish a+  service on the session bus.  Requires the [dbus] package. -`with_utf8`-:    UTF-8 support. Requires the [utf8-string] package.+- `with_threaded` Uses GHC's threaded runtime.  Use this option if+  xmobar enters a high-CPU regime right after starting. -`with_xft`-:    Antialiased fonts. Requires the [X11-xft] package. This option-     automatically enables UTF-8.+- `with_utf8` UTF-8 support. Requires the [utf8-string] package. -     To use XFT fonts you need to use the `xft:` prefix in the `font`-     configuration option. For instance:+- `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:+  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_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_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_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 or `wireless_tools` on Arch Linux).+- `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 or `wireless_tools` on Arch+   Linux). -`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_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_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 `<icon>`.-     Requires the [libXpm] C library.+- `with_xpm` Support for xpm image file format. This will allow loading+  .xpm files in `<icon>`.  Requires the [libXpm] C library. -`with_uvmeter`-:    Enables UVMeter plugin. The plugin shows UV data for Australia. Requires-     `with_conduit` to connect to HTTPS URLs.+- `with_uvmeter` Enables UVMeter plugin. The plugin shows UV data for+   Australia. Requires `with_conduit` to connect to HTTPS URLs. -`with_weather`-:    Support to display weather information. Enables Weather plugin.+- `with_weather` Support to display weather information. Enables+   Weather plugin. -`with_conduit`-:    Use http-conduit for getting weather data enabling support for http proxies.-     Requires [http-conduit] and [http-types].-     Note that this flag has only an effect if `with_weather` is also set.+- `with_conduit` Use http-conduit for getting weather data enabling+  support for http proxies.  Requires [http-conduit] and [http-types].+  Note that this flag has only an effect if `with_weather` is also set. -`all_extensions`-:    Enables all the extensions above.+- `all_extensions` Enables all the extensions above.  # Running xmobar @@ -240,140 +211,119 @@  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.+- `font` Name of the font to be used. Use the `xft:` prefix for XFT+  fonts. -`alpha`-:    The transparency.  0 is transparent, 255 is opaque.+- `additionalFonts` Haskell-style list of fonts to be used with the+  `fn`-template.  Use the `xft:` prefix for XFT fonts. -`position`-:     Top, TopP, TopW, TopSize, Bottom, BottomP, BottomW, BottomSize or Static-      (with x, y, width and height).+- `bgColor` Background color. -:     TopP and BottomP take 2 arguments: left padding and right padding.+- `fgColor` Default font color. -:     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.+- `alpha` The transparency.  0 is transparent, 255 is opaque. -:     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.+- `position` Top, TopP, TopW, TopSize, Bottom, BottomP, BottomW,+  BottomSize or Static (with x, y, width and height). -:     For example:+  TopP and BottomP take 2 arguments: left padding and right padding. -:          position = BottomW C 75+  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. -:     to place xmobar at the bottom, centered with the 75% of 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. -:     Or:+  For example: -:          position = BottomP 120 0+          position = BottomW C 75 -:    to place xmobar at the bottom, with 120 pixel indent of the left.+  to place xmobar at the bottom, centered with the 75% of the screen+  width.  Or +          position = BottomP 120 0 -:     Or+  to place xmobar at the bottom, with 120 pixel indent of the left.+  Or -:          position = Static { xpos = 0 , ypos = 0, width = 1024, height = 15 }+          position = Static { xpos = 0 , ypos = 0, width = 1024, height = 15 } -:     or+  or -:         position = Top+          position = Top -`textOffset`-:     The vertical offset, in pixels, for the text baseline.  If-      negative or not given, xmobar will try to center text-      vertically.+- `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.+- `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.+- `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.+- `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.+- `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`.+- `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.+- `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.+- `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).+- `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.+  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.+  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.+- `borderColor` Border color. -`borderWidth`-:     Border width in pixels.+- `borderWidth` Border width in pixels. -`iconRoot`-:     Root folder where icons are stored. For <icon=path/>-      if path start with `"/"`, `"./"` or `"../"` it is interpreted as-      it is.  Otherwise it will have `iconRoot ++ "/"` prepended to-      it. Default is `"."`.+- `iconRoot` Root folder where icons are stored. For <icon=path/> 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).+- `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 '%').+- `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.+- `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.+- `template` The output template.  -`wmClass`-:    The value for the window's X11 WM_CLASS property.  Defaults to "xmobar".+- `wmClass` The value for the window's X11 WM_CLASS property.+  Defaults to "xmobar". -`wmName`-:    The value for the window's X11 WM_NAME property.  Defaults to "xmobar".+- `wmName` The value for the window's X11 WM_NAME property.  Defaults+  to "xmobar".  ### Running xmobar with i3status @@ -692,6 +642,11 @@       than this value will be truncated.     - Long option: `--maxwidth`     - Default: 0 (no maximum width)+- `-e` _string_ Maximum width ellipsis+    - Ellipsis to be added to the field when it has reached its+      max width.+    - Long option: `--maxwidthellipsis`+    - Default: "" (no ellipsis) - `-w` _number_ Fixed field width     - All fields will be set to this width, padding or truncating as       needed.@@ -701,6 +656,11 @@     - Maximum total width of the text.     - Long option: `--maxtwidth`     - Default: 0 (no limit)+- `-E` _string_ Maximum total width ellipsis+    - Ellipsis to be added to the total text when it has reached+      its max width.+    - Long option: `--maxtwidthellipsis`+    - Default: "" (no ellipsis) - `-c` _string_     - Characters used for padding. The characters of _string_ are used       cyclically. E.g., with `-P +- -w 6`, a field with value "foo"@@ -854,6 +814,8 @@   - `--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.+  - `--fallback-icon-pattern`: dynamic string used by `autoipat` and `ipat{i}` when no+                             `--load-icon-patterns` has been provided for `cpu{i}` - Thresholds refer to percentage of CPU load - Variables that can be used with the `-t`/`--template` argument: 	    `autototal`, `autobar`, `autovbar`, `autoipat`, `autouser`, `autonice`,@@ -866,15 +828,17 @@  ### `Battery Args RefreshRate` -- Same as `BatteryP ["BAT0", "BAT1", "BAT2"] Args RefreshRate`.+- Same as `BatteryP ["BAT", "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+  `["BAT0","BAT1","BAT2"]`. Only up to 3 existing 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):@@ -1570,17 +1534,18 @@ In particular, xmobar [incorporates patches] by Mohammed Alshiekh, Axel Angel, Dragos Boca, Ben Boeckel, Duncan Burke, Roman Cheplyaka, Patrick Chilton, Antoine Eiche, Nathaniel Wesley Filardo, John-Goerzen, Reto Hablützel, Juraj Hercek, Tomáš Janoušek, Spencer-Janssen, Roman Joost, Jochen Keil, Lennart Kolmodin, Krzysztof+Goerzen, Reto Hablützel, Juraj Hercek, Tomáš Janoušek, Ada Joule,+Spencer Janssen, Roman Joost, Jochen Keil, Lennart Kolmodin, Krzysztof Kosciuszkiewicz, Dmitry Kurochkin, Todd Lunter, Robert J. Macomber, Dmitry Malikov, David McLean, Marcin Mikołajczyk, Dino Morelli, Tony Morris, Eric Mrak, Thiago Negri, Edward O'Callaghan, Svein Ove, Martin Perner, Jens Petersen, Alexander Polakov, Petr Rockai, Andrew-Sackville-West, Markus Scherer, Alexander Shabalin, Valentin Shirokov,-Peter Simons, Alexander Solovyov, Will Song, John Soros, Travis-Staton, Artem Tarasov, Samuli Thomasson, Edward Tjörnhammar, Sergei-Trofimovich, Thomas Tuegel, Jan Vornberger, Anton Vorontsov, Daniel-Wagner, Zev Weiss, Phil Xiaojun Hu, Edward Z. Yang and Norbert Zeh.+Sackville-West, Markus Scherer, Olivier Schneider, Alexander Shabalin,+Valentin Shirokov, Peter Simons, Alexander Solovyov, Will Song, John+Soros, Travis Staton, Artem Tarasov, Samuli Thomasson, Edward+Tjörnhammar, Sergei Trofimovich, Thomas Tuegel, Jan Vornberger, Anton+Vorontsov, Daniel Wagner, Zev Weiss, Phil Xiaojun Hu, Edward Z. Yang+and Norbert Zeh.  [jao]: http://jao.io [incorporates patches]: http://www.ohloh.net/p/xmobar/contributors@@ -1622,7 +1587,7 @@ This software is released under a BSD-style license. See [LICENSE] for more details. -Copyright &copy; 2010-2017 Jose Antonio Ortega Ruiz+Copyright &copy; 2010-2018 Jose Antonio Ortega Ruiz  Copyright &copy; 2007-2010 Andrea Rossato 
src/Plugins/Monitors/Batt.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Plugins.Monitors.Batt--- Copyright   :  (c) 2010, 2011, 2012, 2013, 2015, 2016 Jose A Ortega+-- Copyright   :  (c) 2010, 2011, 2012, 2013, 2015, 2016, 2018 Jose A Ortega --                (c) 2010 Andrea Rossato, Petr Rockai -- License     :  BSD-style (see LICENSE) --@@ -107,7 +107,7 @@   , fCurrent :: String   , fStatus :: String   , isCurrent :: Bool-  } | NoFiles+  } | NoFiles deriving Eq  data Battery = Battery   { full :: !Float@@ -174,7 +174,8 @@  readBatteries :: BattOpts -> [Files] -> IO Result readBatteries opts bfs =-    do bats <- mapM (readBattery (scale opts)) (take 3 bfs)+    do let bfs' = filter (/= NoFiles) bfs+       bats <- mapM (readBattery (scale opts)) (take 3 bfs')        ac <- haveAc (onlineFile opts)        let sign = if ac then 1 else -1            ft = sum (map full bats)@@ -194,7 +195,7 @@        return $ if isNaN left then NA else Result left watts time racst  runBatt :: [String] -> Monitor String-runBatt = runBatt' ["BAT0","BAT1","BAT2"]+runBatt = runBatt' ["BAT", "BAT0", "BAT1", "BAT2"]  runBatt' :: [String] -> [String] -> Monitor String runBatt' bfs args = do
src/Plugins/Monitors/Common.hs view
@@ -93,6 +93,7 @@        , decDigits :: IORef Int        , minWidth :: IORef Int        , maxWidth :: IORef Int+       , maxWidthEllipsis :: IORef String        , padChars :: IORef String        , padRight :: IORef Bool        , barBack :: IORef String@@ -101,6 +102,7 @@        , useSuffix :: IORef Bool        , naString :: IORef String        , maxTotalWidth :: IORef Int+       , maxTotalWidthEllipsis :: IORef String        }  -- | from 'http:\/\/www.haskell.org\/hawiki\/MonadState'@@ -138,6 +140,7 @@        d  <- newIORef 0        mn <- newIORef 0        mx <- newIORef 0+       mel <- newIORef ""        pc <- newIORef " "        pr <- newIORef False        bb <- newIORef ":"@@ -146,7 +149,8 @@        up <- newIORef False        na <- newIORef "N/A"        mt <- newIORef 0-       return $ MC nc l lc h hc t e p d mn mx pc pr bb bf bw up na mt+       mtel <- newIORef ""+       return $ MC nc l lc h hc t e p d mn mx mel pc pr bb bf bw up na mt mtel  data Opts = HighColor String           | NormalColor String@@ -159,6 +163,7 @@           | MinWidth String           | MaxWidth String           | Width String+          | WidthEllipsis String           | PadChars String           | PadAlign String           | BarBack String@@ -167,6 +172,7 @@           | UseSuffix String           | NAString String           | MaxTotalWidth String+          | MaxTotalWidthEllipsis String  options :: [OptDescr Opts] options =@@ -183,6 +189,7 @@     , Option "m" ["minwidth"] (ReqArg MinWidth "minimum width") "Minimum field width"     , Option "M" ["maxwidth"] (ReqArg MaxWidth "maximum width") "Maximum field width"     , Option "w" ["width"] (ReqArg Width "fixed width") "Fixed field width"+    , Option "e" ["maxwidthellipsis"] (ReqArg WidthEllipsis "Maximum width ellipsis") "Ellipsis to be added to the field when it has reached its max width."     , Option "c" ["padchars"] (ReqArg PadChars "padding chars") "Characters to use for padding"     , Option "a" ["align"] (ReqArg PadAlign "padding alignment") "'l' for left padding, 'r' for right"     , Option "b" ["bback"] (ReqArg BarBack "bar background") "Characters used to draw bar backgrounds"@@ -190,6 +197,7 @@     , Option "W" ["bwidth"] (ReqArg BarWidth "bar width") "Bar width"     , Option "x" ["nastring"] (ReqArg NAString "N/A string") "String used when the monitor is not available"     , Option "T" ["maxtwidth"] (ReqArg MaxTotalWidth "Maximum total width") "Maximum total width"+    , Option "E" ["maxtwidthellipsis"] (ReqArg MaxTotalWidthEllipsis "Maximum total width ellipsis") "Ellipsis to be added to the total text when it has reached its max width."     ]  doArgs :: [String] -> ([String] -> Monitor String) -> ([String] -> Monitor Bool) -> Monitor String@@ -209,26 +217,28 @@            nz s = let x = read s in max 0 x            bool = (`elem` ["True", "true", "Yes", "yes", "On", "on"])        (case o of-          High        h -> setConfigValue (read h) high-          Low         l -> setConfigValue (read l) low-          HighColor   c -> setConfigValue (Just c) highColor-          NormalColor c -> setConfigValue (Just c) normalColor-          LowColor    c -> setConfigValue (Just c) lowColor-          Template    t -> setConfigValue t template-          PercentPad  p -> setConfigValue (nz p) ppad-          DecDigits   d -> setConfigValue (nz d) decDigits-          MinWidth    w -> setConfigValue (nz w) minWidth-          MaxWidth    w -> setConfigValue (nz w) maxWidth-          Width       w -> setConfigValue (nz w) minWidth >>-                           setConfigValue (nz w) maxWidth-          PadChars    s -> setConfigValue s padChars-          PadAlign    a -> setConfigValue ("r" `isPrefixOf` a) padRight-          BarBack     s -> setConfigValue s barBack-          BarFore     s -> setConfigValue s barFore-          BarWidth    w -> setConfigValue (nz w) barWidth-          UseSuffix   u -> setConfigValue (bool u) useSuffix-          NAString    s -> setConfigValue s naString-          MaxTotalWidth w -> setConfigValue (nz w) maxTotalWidth) >> next+          High                  h -> setConfigValue (read h) high+          Low                   l -> setConfigValue (read l) low+          HighColor             c -> setConfigValue (Just c) highColor+          NormalColor           c -> setConfigValue (Just c) normalColor+          LowColor              c -> setConfigValue (Just c) lowColor+          Template              t -> setConfigValue t template+          PercentPad            p -> setConfigValue (nz p) ppad+          DecDigits             d -> setConfigValue (nz d) decDigits+          MinWidth              w -> setConfigValue (nz w) minWidth+          MaxWidth              w -> setConfigValue (nz w) maxWidth+          Width                 w -> setConfigValue (nz w) minWidth >>+                                   setConfigValue (nz w) maxWidth+          WidthEllipsis         e -> setConfigValue e maxWidthEllipsis+          PadChars              s -> setConfigValue s padChars+          PadAlign              a -> setConfigValue ("r" `isPrefixOf` a) padRight+          BarBack               s -> setConfigValue s barBack+          BarFore               s -> setConfigValue s barFore+          BarWidth              w -> setConfigValue (nz w) barWidth+          UseSuffix             u -> setConfigValue (bool u) useSuffix+          NAString              s -> setConfigValue s naString+          MaxTotalWidth         w -> setConfigValue (nz w) maxTotalWidth+          MaxTotalWidthEllipsis e -> setConfigValue e maxTotalWidthEllipsis) >> next  runM :: [String] -> IO MConfig -> ([String] -> Monitor String) -> Int         -> (String -> IO ()) -> IO ()@@ -336,9 +346,10 @@     do t <- getConfigValue template        e <- getConfigValue export        w <- getConfigValue maxTotalWidth+       ellipsis <- getConfigValue maxTotalWidthEllipsis        let m = Map.fromList . zip e $ l        s <- parseTemplate' t m-       return $ if w > 0 && length s > w then take w s else s+       return $ if w > 0 && length s > w then take w s ++ ellipsis else s  -- | Parses the template given to it with a map of export values and combines -- them@@ -390,15 +401,15 @@   | otherwise = showWithUnits d (n+1) (x/1024)   where units = (!!) ["B", "K", "M", "G", "T"] -padString :: Int -> Int -> String -> Bool -> String -> String-padString mnw mxw pad pr s =+padString :: Int -> Int -> String -> Bool -> String -> String -> String+padString mnw mxw pad pr ellipsis s =   let len = length s       rmin = if mnw <= 0 then 1 else mnw       rmax = if mxw <= 0 then max len rmin else mxw       (rmn, rmx) = if rmin <= rmax then (rmin, rmax) else (rmax, rmin)       rlen = min (max rmn len) rmx   in if rlen < len then-       take rlen s+       take rlen s ++ ellipsis      else let ps = take (rlen - len) (cycle pad)           in if pr then s ++ ps else ps ++ s @@ -420,7 +431,7 @@      up <- getConfigValue useSuffix      let p = showDigits 0 (n * 100)          ps = if up then "%" else ""-     return $ padString pad pad pc pr p ++ ps+     return $ padString pad pad pc pr "" p ++ ps  stringParser :: Pos -> B.ByteString -> String stringParser (x,y) =@@ -442,7 +453,8 @@        mx <- getConfigValue maxWidth        p <- getConfigValue padChars        pr <- getConfigValue padRight-       return $ padString mn mx p pr s+       ellipsis <- getConfigValue maxWidthEllipsis+       return $ padString mn mx p pr ellipsis s  colorizeString :: (Num a, Ord a) => a -> String -> Monitor String colorizeString x s = do
src/Plugins/Monitors/CpuFreq.hs view
@@ -32,10 +32,13 @@ runCpuFreq :: [String] -> Monitor String runCpuFreq _ = do   suffix <- getConfigValue useSuffix+  ddigits <- getConfigValue decDigits   let path = ["/sys/devices/system/cpu/cpu", "/cpufreq/scaling_cur_freq"]       divisor = 1e6 :: Double-      fmt x | x < 1 = show (round (x * 1000) :: Integer) ++-                      if suffix then "MHz" else ""-            | otherwise = show x ++ if suffix then "GHz" else ""+      fmt x | x < 1 = if suffix then mhzFmt x ++ "MHz"+                                else ghzFmt x+            | otherwise = ghzFmt x ++ if suffix then "GHz" else ""+      mhzFmt x = show (round (x * 1000) :: Integer)+      ghzFmt = showDigits ddigits   failureMessage <- getConfigValue naString   checkedDataRetrieval failureMessage [path] Nothing (/divisor) fmt
src/Plugins/Monitors/MultiCpu.hs view
@@ -24,12 +24,14 @@ data MultiCpuOpts = MultiCpuOpts   { loadIconPatterns :: [IconPattern]   , loadIconPattern :: Maybe IconPattern+  , fallbackIconPattern :: Maybe IconPattern   }  defaultOpts :: MultiCpuOpts defaultOpts = MultiCpuOpts   { loadIconPatterns = []   , loadIconPattern = Nothing+  , fallbackIconPattern = Nothing   }  options :: [OptDescr (MultiCpuOpts -> MultiCpuOpts)]@@ -38,6 +40,8 @@      o { loadIconPattern = Just $ parseIconPattern x }) "") ""   , Option "" ["load-icon-patterns"] (ReqArg (\x o ->      o { loadIconPatterns = parseIconPattern x : loadIconPatterns o }) "") ""+  , Option "" ["fallback-icon-pattern"] (ReqArg (\x o ->+     o { fallbackIconPattern = Just $ parseIconPattern x }) "") ""   ]  parseOpts :: [String] -> IO MultiCpuOpts@@ -97,7 +101,7 @@   where tryString           | i == 0 = loadIconPattern opts           | i <= length (loadIconPatterns opts) = Just $ loadIconPatterns opts !! (i - 1)-          | otherwise = Nothing+          | otherwise = fallbackIconPattern opts  splitEvery :: Int -> [a] -> [[a]] splitEvery n = unfoldr (\x -> if null x then Nothing else Just $ splitAt n x)
src/Plugins/Monitors/Net.hs view
@@ -27,6 +27,7 @@ import System.Directory (getDirectoryContents, doesFileExist) import System.FilePath ((</>)) import System.Console.GetOpt+import System.IO.Error (catchIOError)  import qualified Data.ByteString.Lazy.Char8 as B @@ -105,9 +106,9 @@         excludes = [".", "..", "lo"]  isUp :: String -> IO Bool-isUp d = do+isUp d = flip catchIOError (const $ return False) $ do   operstate <- B.readFile (operstateDir d)-  return $ (B.unpack . head . B.lines) operstate `elem`  ["up", "unknown"]+  return $! (B.unpack . head . B.lines) operstate `elem`  ["up", "unknown"]  readNetDev :: [String] -> IO NetDevRawTotal readNetDev (d:x:y:_) = do
src/Plugins/Monitors/Top.hs view
@@ -80,7 +80,7 @@   let lsms = length sms       nmw = mnw - lsms - 1       nmx = mxw - lsms - 1-      rnm = if nmw > 0 then padString nmw nmx " " True nm else nm+      rnm = if nmw > 0 then padString nmw nmx " " True "" nm else nm   mstr <- showWithColors' sms mms   both <- showWithColors' (rnm ++ " " ++ sms) mms   return [nm, mstr, both]
+ test/Spec.hs view
@@ -0,0 +1,1 @@+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
xmobar.cabal view
@@ -1,9 +1,9 @@ name:               xmobar-version:            0.25+version:            0.26 homepage:           http://xmobar.org synopsis:           A Minimalistic Text Based Status Bar description: 	    Xmobar is a minimalistic text based status bar.-		    .+                    .                     Inspired by the Ion3 status bar, it supports similar                     features, like dynamic color management, output templates,                     and extensibility through plugins.@@ -13,14 +13,56 @@ author:             Andrea Rossato and Jose A. Ortega Ruiz maintainer:         Jose A. Ortega Ruiz <jao@gnu.org> bug-reports:        https://github.com/jaor/xmobar/issues-cabal-version:      >= 1.6+cabal-version:      >= 1.8 build-type:         Simple -extra-source-files: readme.md, news.md,+extra-source-files: readme.md, changelog.md,                     samples/xmobar.config, samples/xmonadpropwrite.hs                     samples/Plugins/helloworld.config,                     samples/Plugins/HelloWorld.hs +test-suite XmobarTest+  type:           exitcode-stdio-1.0+  hs-source-dirs:+    src,+    test+  main-is:        Spec.hs+  other-modules:+        Xmobar, Actions, Bitmap, Config, Parsers, Commands, Localize,+        XUtil, StatFS, Runnable, ColorCache, Window, Signal,+        Environment,+        Plugins, Plugins.BufferedPipeReader,+        Plugins.CommandReader, Plugins.Date, Plugins.EWMH,+        Plugins.PipeReader, Plugins.MarqueePipeReader,+        Plugins.StdinReader, Plugins.XMonadLog,+        Plugins.Utils, Plugins.Kbd, Plugins.Locks, Plugins.Monitors,+        Plugins.Monitors.Batt, Plugins.Monitors.Common,+        Plugins.Monitors.CoreCommon, Plugins.Monitors.CoreTemp,+        Plugins.Monitors.CpuFreq, Plugins.Monitors.Cpu,+        Plugins.Monitors.Disk, Plugins.Monitors.Mem,+        Plugins.Monitors.MultiCpu, Plugins.Monitors.Net,+        Plugins.Monitors.Swap, Plugins.Monitors.Thermal,+        Plugins.Monitors.ThermalZone, Plugins.Monitors.Top,+        Plugins.Monitors.Uptime,+        Plugins.Monitors.Bright, Plugins.Monitors.CatInt+  build-depends:+    base == 4.*,+    hspec == 2.*,+    containers,+    regex-compat,+    process,+    old-locale,+    bytestring,+    directory,+    unix,+    time,+    filepath,+    transformers,+    X11 >= 1.6.1,+    mtl >= 2.1 && < 2.3,+    parsec == 3.1.*,+    stm >= 2.3 && < 2.5+ source-repository head   type:      git   location:  git://github.com/jaor/xmobar.git@@ -179,7 +221,7 @@        cpp-options: -DDATEZONE      if flag(with_mpris) || flag(all_extensions)-       build-depends: dbus >= 0.10+       build-depends: dbus >= 0.10 && < 1.0        other-modules: Plugins.Monitors.Mpris        cpp-options: -DMPRIS