summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/Thermal.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Plugins/Monitors/Thermal.hs')
-rw-r--r--src/Plugins/Monitors/Thermal.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Plugins/Monitors/Thermal.hs b/src/Plugins/Monitors/Thermal.hs
index 6013511..5a97152 100644
--- a/src/Plugins/Monitors/Thermal.hs
+++ b/src/Plugins/Monitors/Thermal.hs
@@ -14,7 +14,6 @@
module Plugins.Monitors.Thermal where
-import Control.Monad (liftM)
import qualified Data.ByteString.Lazy.Char8 as B
import Plugins.Monitors.Common
import System.Posix.Files (fileExist)
@@ -34,8 +33,7 @@ runThermal args = do
file = "/proc/acpi/thermal_zone/" ++ zone ++ "/temperature"
exists <- io $ fileExist file
if exists
- then do number <- io $ liftM ((read :: String -> Int) . stringParser (1, 0)) (B.readFile file)
+ then do number <- io $ fmap ((read :: String -> Int) . stringParser (1, 0)) (B.readFile file)
thermal <- showWithColors show number
parseTemplate [ thermal ]
else return $ "Thermal (" ++ zone ++ "): N/A"
-