summaryrefslogtreecommitdiffhomepage
path: root/Plugins
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-10-04 02:03:48 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-10-04 02:03:48 +0200
commit290f3520cd1d4b675b928b935e579686c3daf236 (patch)
tree164acaa225c4748ebcb8d6064ca342fe7471a818 /Plugins
parentc6a089e448a8c270b106eb862419c4a49982e9d4 (diff)
downloadxmobar-290f3520cd1d4b675b928b935e579686c3daf236.tar.gz
xmobar-290f3520cd1d4b675b928b935e579686c3daf236.tar.bz2
Weather plugin: accept temperatures with decimal points
darcs-hash:20071004000348-a5988-9c568e8d696b344f66f42b0e0993e76f3c591632.gz
Diffstat (limited to 'Plugins')
-rw-r--r--Plugins/Monitors/Weather.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Plugins/Monitors/Weather.hs b/Plugins/Monitors/Weather.hs
index cc3a58b..38577bc 100644
--- a/Plugins/Monitors/Weather.hs
+++ b/Plugins/Monitors/Weather.hs
@@ -71,11 +71,11 @@ pTime = do y <- getNumbersAsString
return (y, m, d ,([h]++[hh]++":"++[mi]++mimi))
pTemp :: Parser (Int, Int)
-pTemp = do f <- manyTill digit $ char ' '
+pTemp = do f <- manyTill (digit <|> char '.') $ char ' '
manyTill anyChar $ char '('
c <- manyTill digit $ (char ' ' <|> char '.')
skipRestOfLine
- return $ (read c, read f)
+ return $ (floor (read c :: Double), floor (read f :: Double))
pRh :: Parser Int
pRh = do s <- manyTill digit $ (char '%' <|> char '.')