diff options
author | jao <jao@gnu.org> | 2022-03-30 22:09:47 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-03-30 22:09:47 +0100 |
commit | ec28c44674dde082980c8b23fc6ef6897fadd122 (patch) | |
tree | b7ba39c85dfec711570c7fbaed63d30563877c07 /src/Xmobar | |
parent | 88230bb0301aebc37c971d235f5a9735d9563f8d (diff) | |
download | xmobar-ec28c44674dde082980c8b23fc6ef6897fadd122.tar.gz xmobar-ec28c44674dde082980c8b23fc6ef6897fadd122.tar.bz2 |
Wee clean-ups
Diffstat (limited to 'src/Xmobar')
-rw-r--r-- | src/Xmobar/Plugins/Monitors/Load.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Xmobar/Plugins/Monitors/Load.hs b/src/Xmobar/Plugins/Monitors/Load.hs index 4703e8a..616b673 100644 --- a/src/Xmobar/Plugins/Monitors/Load.hs +++ b/src/Xmobar/Plugins/Monitors/Load.hs @@ -19,7 +19,6 @@ module Xmobar.Plugins.Monitors.Load (loadConfig, runLoad) where import Xmobar.Plugins.Monitors.Common import qualified Data.ByteString.Lazy.Char8 as B import System.Posix.Files (fileExist) -import Control.Monad (zipWithM) -- | Default configuration. loadConfig :: IO MConfig @@ -31,7 +30,7 @@ loadConfig = mkMConfig -- the list of load averages parseLoadAvgs :: B.ByteString -> [Float] parseLoadAvgs = - map ((read :: String -> Float) . B.unpack) . take 3 . B.words . head . B.lines + map (read . B.unpack) . take 3 . B.words . head . B.lines -- | Retrieves load information. Returns the monitor string parsed -- according to template (either default or user specified). @@ -42,7 +41,6 @@ runLoad _ = do if exists then (do l <- io $ B.readFile file >>= return . parseLoadAvgs d <- getConfigValue decDigits - let s = showWithColors . const . showDigits d - parseTemplate =<< zipWithM s l l) + parseTemplate =<< mapM (showWithColors (showDigits d)) l) else return "Load: N/A" |