From 1ef771a0610ebd9d081bb83b8834077ca752d25a Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 21 Nov 2021 22:09:46 +0000 Subject: Improvements for K10Temp's docs --- src/Xmobar/Plugins/Monitors/K10Temp.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/Xmobar/Plugins') diff --git a/src/Xmobar/Plugins/Monitors/K10Temp.hs b/src/Xmobar/Plugins/Monitors/K10Temp.hs index e76d01a..30b3d90 100644 --- a/src/Xmobar/Plugins/Monitors/K10Temp.hs +++ b/src/Xmobar/Plugins/Monitors/K10Temp.hs @@ -27,6 +27,12 @@ k10TempConfig = mkMConfig ,"Tccd4", "Tccd5", "Tccd6", "Tccd7", "Tccd8" ] -- available replacements +-- | +-- Base directory for k10temp system bus +-- +k10Dir :: String +k10Dir = "/sys/bus/pci/drivers/k10temp/" + -- | -- Function retrieves monitor string holding the temperature -- (or temperatures) @@ -35,7 +41,7 @@ runK10Temp args = do dn <- getConfigValue decDigits failureMessage <- getConfigValue naString let slot = head args - path = ["/sys/bus/pci/drivers/k10temp/" ++ slot ++ "/hwmon/hwmon", "/temp", "_input"] + path = [k10Dir ++ slot ++ "/hwmon/hwmon", "/temp", "_input"] divisor = 1e3 :: Double show' = showDigits (max 0 dn) checkedDataRetrieval failureMessage [path] Nothing (/divisor) show' -- cgit v1.2.3