Permalink
Browse files

More paths for CoreTemp (issue #291)

  • Loading branch information...
jaor committed Mar 3, 2017
1 parent dfb5dbd commit 938a8d8307c1c4794c5fcf269c587c3c5c5e70df
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/Plugins/Monitors/CoreTemp.hs
@@ -39,7 +39,8 @@ runCoreTemp _ = do
failureMessage <- getConfigValue naString
let path = ["/sys/bus/platform/devices/coretemp.", "/temp", "_input"]
path' = ["/sys/bus/platform/devices/coretemp.", "/hwmon/hwmon", "/temp", "_input"]
path'' = ["/sys/class/hwmon/hwmon", "/device/hwmon/hwmon", "/temp", "_input"]
lbl = Just ("_label", read . dropWhile (not . isDigit))
divisor = 1e3 :: Double
show' = showDigits (max 0 dn)
checkedDataRetrieval failureMessage [path, path'] lbl (/divisor) show'
checkedDataRetrieval failureMessage [path, path', path''] lbl (/divisor) show'

0 comments on commit 938a8d8

Please sign in to comment.