summaryrefslogtreecommitdiffhomepage
path: root/Plugins/Monitors/Common.hs
diff options
context:
space:
mode:
authorJens Petersen <petersen@haskell.org>2007-09-12 09:09:49 +0200
committerJens Petersen <petersen@haskell.org>2007-09-12 09:09:49 +0200
commite90c9c0850e4bbee6ceeba05d93b5671cb150e7f (patch)
tree91c43d0cc0d7a372da6e6a526abb67a3e201a085 /Plugins/Monitors/Common.hs
parentbc79a08491bb14a463b6b7554a64ac1347c02a6a (diff)
downloadxmobar-e90c9c0850e4bbee6ceeba05d93b5671cb150e7f.tar.gz
xmobar-e90c9c0850e4bbee6ceeba05d93b5671cb150e7f.tar.bz2
Parse the temperature separately in Celcius and Fahrenheit.
Parse the pressure in hPa. Generalize showWithColors to (Num a, Ord a) so it works for both Int's and Float's. Use an Int for temperature, pressure, and relative humidity. darcs-hash:20070912070949-740ef-0e79d57888c1519e1324d06b17fe2fa0d3d0fb2d.gz
Diffstat (limited to 'Plugins/Monitors/Common.hs')
-rw-r--r--Plugins/Monitors/Common.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Plugins/Monitors/Common.hs b/Plugins/Monitors/Common.hs
index 5177fb8..7887e14 100644
--- a/Plugins/Monitors/Common.hs
+++ b/Plugins/Monitors/Common.hs
@@ -265,7 +265,7 @@ setColor str s =
Just c -> return $
"<fc=" ++ c ++ ">" ++ str ++ "</fc>"
-showWithColors :: (Float -> String) -> Float -> Monitor String
+showWithColors :: (Num a, Ord a) => (a -> String) -> a -> Monitor String
showWithColors f x =
do h <- getConfigValue high
l <- getConfigValue low