diff options
author | Sibi Prabakaran <sibi@psibi.in> | 2020-06-14 18:08:03 +0530 |
---|---|---|
committer | jao <jao@gnu.org> | 2020-06-23 16:38:20 +0100 |
commit | 148f1083c45bc66112ff18d44f4d2a43d891c5ca (patch) | |
tree | 0c0825f99a00c61483e067b082a7d506ef3faa01 /src | |
parent | 2be4a584f29c3c9c105b56fcd83fa3f532caa4a0 (diff) | |
download | xmobar-148f1083c45bc66112ff18d44f4d2a43d891c5ca.tar.gz xmobar-148f1083c45bc66112ff18d44f4d2a43d891c5ca.tar.bz2 |
Hlint fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/Xmobar/Plugins/Monitors/Common/Parsers.hs | 2 | ||||
-rw-r--r-- | src/Xmobar/Plugins/Monitors/Common/Types.hs | 6 | ||||
-rw-r--r-- | src/Xmobar/Plugins/Monitors/Cpu.hs | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/Xmobar/Plugins/Monitors/Common/Parsers.hs b/src/Xmobar/Plugins/Monitors/Common/Parsers.hs index 99b4aaf..188b87d 100644 --- a/src/Xmobar/Plugins/Monitors/Common/Parsers.hs +++ b/src/Xmobar/Plugins/Monitors/Common/Parsers.hs @@ -54,7 +54,7 @@ runExportParser (x:xs) = do pureParseTemplate :: PureConfig -> TemplateInput -> IO String pureParseTemplate PureConfig{..} TemplateInput{..} = do let m = let expSnds :: [([(String, String, String)], String)] = zip (map snd temAllTemplate) temMonitorValues - in Map.fromList $ zip (map fst temAllTemplate) $ expSnds + in Map.fromList $ zip (map fst temAllTemplate) expSnds s <- minCombine m temInputTemplate let (n, s') = if pMaxTotalWidth > 0 && length s > pMaxTotalWidth then trimTo (pMaxTotalWidth - length pMaxTotalWidthEllipsis) "" s diff --git a/src/Xmobar/Plugins/Monitors/Common/Types.hs b/src/Xmobar/Plugins/Monitors/Common/Types.hs index f1d85c9..a2d5eb4 100644 --- a/src/Xmobar/Plugins/Monitors/Common/Types.hs +++ b/src/Xmobar/Plugins/Monitors/Common/Types.hs @@ -73,11 +73,11 @@ data MConfig = data PureConfig = PureConfig - { pNormalColor :: (Maybe String) + { pNormalColor :: Maybe String , pLow :: Int - , pLowColor :: (Maybe String) + , pLowColor :: Maybe String , pHigh :: Int - , pHighColor :: (Maybe String) + , pHighColor :: Maybe String , pTemplate :: String , pExport :: [String] , pPpad :: Int 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 |