diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-12-26 15:13:08 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-12-26 15:13:08 +0100 |
commit | 015ada9c062e1bd3e5c1791c14f5c894fabda00a (patch) | |
tree | dc353cedd402e070a305c3689d3e30a9220ca80d | |
parent | ef840a7d51f2e3874f070ec8af5c76011ef070c5 (diff) | |
download | xmobar-015ada9c062e1bd3e5c1791c14f5c894fabda00a.tar.gz xmobar-015ada9c062e1bd3e5c1791c14f5c894fabda00a.tar.bz2 |
Back to nominal units for battery power
Must have been a glitch in my kernel version (?)
-rw-r--r-- | src/Plugins/Monitors/Batt.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Plugins/Monitors/Batt.hs b/src/Plugins/Monitors/Batt.hs index 4445e7a..69ce136 100644 --- a/src/Plugins/Monitors/Batt.hs +++ b/src/Plugins/Monitors/Batt.hs @@ -123,9 +123,9 @@ readBattery files = do a <- grab $ fFull files b <- grab $ fNow files d <- grab $ fCurrent files - return $ Battery (3600 * a / 1e5) -- wattseconds - (3600 * b / 1e5) -- wattseconds - (d / 1e5) -- watts + return $ Battery (3600 * a / 1e6) -- wattseconds + (3600 * b / 1e6) -- wattseconds + (d / 1e6) -- watts where grab f = handle onError $ withFile f ReadMode (fmap read . hGetLine) onError = const (return (-1)) :: SomeException -> IO Float |