summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Plugins/Monitors/Cpu.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xmobar/Plugins/Monitors/Cpu.hs')
-rw-r--r--src/Xmobar/Plugins/Monitors/Cpu.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Xmobar/Plugins/Monitors/Cpu.hs b/src/Xmobar/Plugins/Monitors/Cpu.hs
index 22cd6bb..7f05663 100644
--- a/src/Xmobar/Plugins/Monitors/Cpu.hs
+++ b/src/Xmobar/Plugins/Monitors/Cpu.hs
@@ -134,7 +134,7 @@ parseCpu cref =
tot = fromIntegral $ sum dif
safeDiv n = case tot of
0 -> 0
- v -> (fromIntegral n) / v
+ v -> fromIntegral n / v
percent = map safeDiv dif
return $ convertToCpuData percent
@@ -181,9 +181,9 @@ computeFields [] _ = []
computeFields (x:xs) inputFields =
if x `elem` inputFields
then (Field {fieldName = x, fieldCompute = Compute}) :
- (computeFields xs inputFields)
+ computeFields xs inputFields
else (Field {fieldName = x, fieldCompute = Skip}) :
- (computeFields xs inputFields)
+ computeFields xs inputFields
formatCpu :: CpuArguments -> CpuData -> IO [String]
formatCpu CpuArguments{..} cpuInfo = do