summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--NEWS54
-rw-r--r--Plugins/Monitors/Cpu.hs4
-rw-r--r--Plugins/Monitors/MultiCpu.hs2
-rw-r--r--README3
-rw-r--r--xmobar.cabal1
5 files changed, 61 insertions, 3 deletions
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..295a99f
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,54 @@
+% xmobar - Release notes
+% Jose A. Ortega Ruiz
+
+## Version 0.12 (Dec 12, 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, xombar's author and maintainer so far,
+for creating xmobar in the first place, and for giving me the chance
+to become its maintainer.
+
+[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.
+ - MPD: 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.
+ - New Monitor option (`-P`) to enable displaying the `%` sign in
+ percentages; the sign is now never included by default.
+ - New 'run once' commands, by specifying a 0 refresh rate in `Run
+ Com` ([issue 26]).
+ - 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).
+ - 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.
+
+[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
diff --git a/Plugins/Monitors/Cpu.hs b/Plugins/Monitors/Cpu.hs
index 71e8ac3..ab89246 100644
--- a/Plugins/Monitors/Cpu.hs
+++ b/Plugins/Monitors/Cpu.hs
@@ -28,7 +28,7 @@ cpuData = do s <- B.readFile "/proc/stat"
cpuParser :: B.ByteString -> [Float]
cpuParser =
- map (read . B.unpack) . tail . B.words . flip (!!) 0 . B.lines
+ map (read . B.unpack) . tail . B.words . head . B.lines
parseCPU :: IO [Float]
parseCPU =
@@ -39,7 +39,7 @@ parseCPU =
return percent
formatCpu :: [Float] -> Monitor [String]
-formatCpu [] = return [""]
+formatCpu [] = return $ repeat ""
formatCpu xs = do
let t = foldr (+) 0 $ take 3 xs
b <- showPercentBar (100 * t) t
diff --git a/Plugins/Monitors/MultiCpu.hs b/Plugins/Monitors/MultiCpu.hs
index 17620d5..492ad96 100644
--- a/Plugins/Monitors/MultiCpu.hs
+++ b/Plugins/Monitors/MultiCpu.hs
@@ -50,7 +50,7 @@ percent b a = if tot > 0 then map (/ tot) $ take 4 dif else [0, 0, 0, 0]
tot = foldr (+) 0 dif
formatMultiCpus :: [[Float]] -> Monitor [String]
-formatMultiCpus [] = showPercentsWithColors $ replicate 15 0.0
+formatMultiCpus [] = return $ repeat ""
formatMultiCpus xs = fmap concat $ mapM formatCpu xs
formatCpu :: [Float] -> Monitor [String]
diff --git a/README b/README
index e797f3a..5201334 100644
--- a/README
+++ b/README
@@ -12,10 +12,13 @@ xmobar was inspired by the [Ion3] status bar, and supports similar
features, like dynamic color management, output templates, and
extensibility through plugins.
+This page documents xmobar 0.12 (see [release notes]).
+
[This is a screen shot] of Andrea's desktop with [xmonad] and xmobar.
[This] is 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 is a screen shot]: http://haskell.org/sitewiki/images/a/ae/Arossato-config.png
diff --git a/xmobar.cabal b/xmobar.cabal
index c99b502..d1eb571 100644
--- a/xmobar.cabal
+++ b/xmobar.cabal
@@ -11,6 +11,7 @@ description: Xmobar is a minimalistic text based status bar.
category: System
license: BSD3
license-file: LICENSE
+extra-source-files: README, NEWS
author: Andrea Rossato
maintainer: Jose A. Ortega Ruiz <jao@gnu.org>
cabal-version: >= 1.6