From 112d0191be18b474c750664f683e17c9e919d020 Mon Sep 17 00:00:00 2001 From: Juraj Hercek Date: Sun, 23 Dec 2007 00:10:39 +0100 Subject: Adjusted thermal monitor. - Thermal monitor can handle more thermal zones now darcs-hash:20071222231039-f49a6-0a8a2f7d575f7e82adbd9b3ee261d046e616dc07.gz --- Plugins/Monitors/Thermal.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Plugins/Monitors') diff --git a/Plugins/Monitors/Thermal.hs b/Plugins/Monitors/Thermal.hs index 2794a60..4814aa5 100644 --- a/Plugins/Monitors/Thermal.hs +++ b/Plugins/Monitors/Thermal.hs @@ -24,11 +24,12 @@ thermalConfig = mkMConfig ["temp"] -- available replacements runThermal :: [String] -> Monitor String -runThermal _ = do - let file = "/proc/acpi/thermal_zone/THM/temperature" +runThermal args = do + let zone = head args + file = "/proc/acpi/thermal_zone/" ++ zone ++ "/temperature" exists <- io $ fileExist file case exists of - False -> return "Thermal: N/A" + False -> return $ "Thermal (" ++ zone ++ "): N/A" True -> do number <- io $ B.readFile file >>= return . (read :: String -> Int) . stringParser (1, 0) -- cgit v1.2.3