From a615474dc2daa250602262d59bd3daa7d603cc12 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Wed, 8 Dec 2010 01:38:14 +0100 Subject: Default to False for the -P option and leave the % to the templates --- Plugins/Monitors/Cpu.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Plugins/Monitors/Cpu.hs') diff --git a/Plugins/Monitors/Cpu.hs b/Plugins/Monitors/Cpu.hs index d94bd0f..78e3ec7 100644 --- a/Plugins/Monitors/Cpu.hs +++ b/Plugins/Monitors/Cpu.hs @@ -19,8 +19,8 @@ import qualified Data.ByteString.Lazy.Char8 as B cpuConfig :: IO MConfig cpuConfig = mkMConfig - "Cpu: " -- template - ["bar","total","user","nice","system","idle"] -- available replacements + "Cpu: %" + ["bar","total","user","nice","system","idle"] cpuData :: IO [Float] cpuData = do s <- B.readFile "/proc/stat" @@ -28,7 +28,7 @@ cpuData = do s <- B.readFile "/proc/stat" cpuParser :: B.ByteString -> [Float] cpuParser = - map read . map B.unpack . tail . B.words . flip (!!) 0 . B.lines + map (read . B.unpack) . tail . B.words . flip (!!) 0 . B.lines parseCPU :: IO [Float] parseCPU = @@ -48,6 +48,6 @@ formatCpu xs = do runCpu :: [String] -> Monitor String runCpu _ = - do c <- io $ parseCPU + do c <- io parseCPU l <- formatCpu c parseTemplate l -- cgit v1.2.3