ENH enable line buffering in xmobar
This commit is contained in:
parent
8a217d08eb
commit
745a548baf
|
@ -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
|
||||
run = do
|
||||
-- IDK why this is needed, I thought this was default
|
||||
hSetBuffering stdout LineBuffering
|
||||
withCache $ withDBus_ $ \db -> do
|
||||
c <- evalConfig db
|
||||
liftIO $ do
|
||||
-- this is needed to see any printed messages
|
||||
hFlush stdout
|
||||
xmobar c
|
||||
liftIO $ xmobar c
|
||||
|
||||
evalConfig :: DBusState -> FIO Config
|
||||
evalConfig db = do
|
||||
|
|
Loading…
Reference in New Issue