summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/CpuFreq.hs
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2013-08-13 20:13:10 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2013-08-13 20:13:10 +0200
commitfef0e7cb24f6b567c61c93cf8f5e13576a087b7c (patch)
tree2ff360ea9bb5c7a16bf6754d10825df9cd6f923d /src/Plugins/Monitors/CpuFreq.hs
parent146095f76c70444970b49f22ab48836c8759ccc1 (diff)
downloadxmobar-fef0e7cb24f6b567c61c93cf8f5e13576a087b7c.tar.gz
xmobar-fef0e7cb24f6b567c61c93cf8f5e13576a087b7c.tar.bz2
Version bump
Diffstat (limited to 'src/Plugins/Monitors/CpuFreq.hs')
-rw-r--r--src/Plugins/Monitors/CpuFreq.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Plugins/Monitors/CpuFreq.hs b/src/Plugins/Monitors/CpuFreq.hs
index dcf75e5..6209ef3 100644
--- a/src/Plugins/Monitors/CpuFreq.hs
+++ b/src/Plugins/Monitors/CpuFreq.hs
@@ -30,10 +30,10 @@ cpuFreqConfig = mkMConfig
-- |
-- Function retrieves monitor string holding the cpu frequency (or frequencies)
runCpuFreq :: [String] -> Monitor String
-runCpuFreq _ = let path = ["/sys/devices/system/cpu/cpu", "/cpufreq/scaling_cur_freq"]
- divisor = 1e6 :: Double
- failureMessage = "CpuFreq: N/A"
- fmt x | x < 1 = (show (round (x * 1000) :: Integer)) ++ "MHz"
- | otherwise = (show x) ++ "GHz"
- in checkedDataRetrieval failureMessage path Nothing (/divisor) fmt
-
+runCpuFreq _ =
+ let path = ["/sys/devices/system/cpu/cpu", "/cpufreq/scaling_cur_freq"]
+ divisor = 1e6 :: Double
+ failureMessage = "CpuFreq: N/A"
+ fmt x | x < 1 = (show (round (x * 1000) :: Integer)) ++ "MHz"
+ | otherwise = (show x) ++ "GHz"
+ in checkedDataRetrieval failureMessage path Nothing (/divisor) fmt