From c7d9fd8fe08f6474253733fd537a1b07251f3633 Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 30 Nov 2022 06:17:18 +0000 Subject: linting --- src/Xmobar/Plugins/Kraken.hs | 2 +- src/Xmobar/Plugins/Monitors/Common/Output.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Xmobar/Plugins/Kraken.hs b/src/Xmobar/Plugins/Kraken.hs index 2345b3d..5d565e0 100644 --- a/src/Xmobar/Plugins/Kraken.hs +++ b/src/Xmobar/Plugins/Kraken.hs @@ -36,7 +36,7 @@ instance Exec Kraken where cb (display g) loop mv g - loop mvar (Map.fromList $ zip ps (repeat 0.0)) + loop mvar (Map.fromList $ map (, 0.0) ps) where display :: Map.Map String Double -> String diff --git a/src/Xmobar/Plugins/Monitors/Common/Output.hs b/src/Xmobar/Plugins/Monitors/Common/Output.hs index bd60710..2d0e194 100644 --- a/src/Xmobar/Plugins/Monitors/Common/Output.hs +++ b/src/Xmobar/Plugins/Monitors/Common/Output.hs @@ -140,7 +140,7 @@ showWithUnits d n x padString :: Int -> Int -> String -> Bool -> String -> String -> String padString mnw mxw pad pr ellipsis s = let len = length s - rmin = if mnw < 0 then 0 else mnw + rmin = max mnw 0 rmax = if mxw <= 0 then max len rmin else mxw (rmn, rmx) = if rmin <= rmax then (rmin, rmax) else (rmax, rmin) rlen = min (max rmn len) rmx -- cgit v1.2.3