summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Xmobar/Plugins/StdinReader.hs3
-rw-r--r--src/Xmobar/System/Utils.hs3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/Xmobar/Plugins/StdinReader.hs b/src/Xmobar/Plugins/StdinReader.hs
index 5a8b2be..bc4bb5f 100644
--- a/src/Xmobar/Plugins/StdinReader.hs
+++ b/src/Xmobar/Plugins/StdinReader.hs
@@ -31,8 +31,7 @@ data StdinReader = StdinReader | UnsafeStdinReader
instance Exec StdinReader where
start stdinReader cb = do
- s <- handle (\(SomeException e) -> do hPrint stderr e; return "")
- (hGetLine stdin)
+ s <- handle (\(SomeException e) -> do hPrint stderr e; return "") getLine
cb $ escape stdinReader s
eof <- isEOF
if eof
diff --git a/src/Xmobar/System/Utils.hs b/src/Xmobar/System/Utils.hs
index 227850d..636436b 100644
--- a/src/Xmobar/System/Utils.hs
+++ b/src/Xmobar/System/Utils.hs
@@ -3,7 +3,7 @@
------------------------------------------------------------------------------
-- |
-- Module: Utils
--- Copyright: (c) 2010, 2018 Jose Antonio Ortega Ruiz
+-- Copyright: (c) 2010, 2018, 2020 Jose Antonio Ortega Ruiz
-- License: BSD3-style (see LICENSE)
--
-- Maintainer: Jose A Ortega Ruiz <jao@gnu.org>
@@ -25,7 +25,6 @@ import Control.Concurrent.STM
import System.Environment
import System.FilePath
-import System.IO
expandHome :: FilePath -> IO FilePath
expandHome ('~':'/':path) = fmap (</> path) (getEnv "HOME")