diff --git a/bin/xmobar.hs b/bin/xmobar.hs index 026d474..f15b839 100644 --- a/bin/xmobar.hs +++ b/bin/xmobar.hs @@ -18,7 +18,6 @@ import qualified RIO.ByteString.Lazy as BL import RIO.List import RIO.Process import qualified RIO.Text as T -import System.IO import UnliftIO.Environment import XMonad.Core hiding (config) import XMonad.Internal.Command.Desktop @@ -50,12 +49,12 @@ parse ["--test"] = withCache $ withDBus_ evalConfig parse _ = usage run :: IO () -run = withCache $ withDBus_ $ \db -> do - c <- evalConfig db - liftIO $ do - -- this is needed to see any printed messages - hFlush stdout - xmobar c +run = do + -- IDK why this is needed, I thought this was default + hSetBuffering stdout LineBuffering + withCache $ withDBus_ $ \db -> do + c <- evalConfig db + liftIO $ xmobar c evalConfig :: DBusState -> FIO Config evalConfig db = do