summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/CpuFreq.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Plugins/Monitors/CpuFreq.hs')
-rw-r--r--src/Plugins/Monitors/CpuFreq.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Plugins/Monitors/CpuFreq.hs b/src/Plugins/Monitors/CpuFreq.hs
index 3fe2577..d3ecf89 100644
--- a/src/Plugins/Monitors/CpuFreq.hs
+++ b/src/Plugins/Monitors/CpuFreq.hs
@@ -24,8 +24,8 @@ import Plugins.Monitors.CoreCommon
cpuFreqConfig :: IO MConfig
cpuFreqConfig = mkMConfig
"Freq: <cpu0>" -- template
- (zipWith (++) (repeat "cpu") (map show [0 :: Int ..])) -- available
- -- replacements
+ (map ((++) "cpu" . show) [0 :: Int ..]) -- available
+ -- replacements
-- |
-- Function retrieves monitor string holding the cpu frequency (or frequencies)
@@ -33,7 +33,7 @@ runCpuFreq :: [String] -> Monitor String
runCpuFreq _ = do
let path = ["/sys/devices/system/cpu/cpu", "/cpufreq/scaling_cur_freq"]
divisor = 1e6 :: Double
- fmt x | x < 1 = (show (round (x * 1000) :: Integer)) ++ "MHz"
- | otherwise = (show x) ++ "GHz"
+ fmt x | x < 1 = show (round (x * 1000) :: Integer) ++ "MHz"
+ | otherwise = show x ++ "GHz"
failureMessage <- getConfigValue naString
checkedDataRetrieval failureMessage [path] Nothing (/divisor) fmt