From dde86479be0835ae4a9fe14e14857a3460fd8e1d Mon Sep 17 00:00:00 2001 From: Pavel Kalugin Date: Mon, 31 Jan 2022 21:46:01 +0300 Subject: Fix text output buffering Signed-off-by: Pavel Kalugin --- src/Xmobar/App/TextEventLoop.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Xmobar/App/TextEventLoop.hs b/src/Xmobar/App/TextEventLoop.hs index cd7919c..57f5c1a 100644 --- a/src/Xmobar/App/TextEventLoop.hs +++ b/src/Xmobar/App/TextEventLoop.hs @@ -17,6 +17,7 @@ module Xmobar.App.TextEventLoop (textLoop) where import Prelude hiding (lookup) +import System.IO import Data.List (intercalate) import Control.Monad.Reader @@ -39,6 +40,8 @@ startTextLoop' :: Config -> [[([Async ()], TVar String)]] -> IO () startTextLoop' cfg sig pauser vs = do + hSetBuffering stdin LineBuffering + hSetBuffering stdout LineBuffering tv <- initLoop sig pauser vs eventLoop cfg tv sig -- cgit v1.2.3