summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/Thermal.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2017-04-29 02:09:24 +0200
committerjao <jao@gnu.org>2017-04-29 02:09:24 +0200
commite41fd61bdeac8779fa24050cc0d44714f7c90f1d (patch)
treef724480c121a1246c942ed913f167fa71a9e2564 /src/Plugins/Monitors/Thermal.hs
parent938a8d8307c1c4794c5fcf269c587c3c5c5e70df (diff)
downloadxmobar-e41fd61bdeac8779fa24050cc0d44714f7c90f1d.tar.gz
xmobar-e41fd61bdeac8779fa24050cc0d44714f7c90f1d.tar.bz2
hlint configuration
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"
-