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.List
|
||||||
import RIO.Process
|
import RIO.Process
|
||||||
import qualified RIO.Text as T
|
import qualified RIO.Text as T
|
||||||
import System.IO
|
|
||||||
import UnliftIO.Environment
|
import UnliftIO.Environment
|
||||||
import XMonad.Core hiding (config)
|
import XMonad.Core hiding (config)
|
||||||
import XMonad.Internal.Command.Desktop
|
import XMonad.Internal.Command.Desktop
|
||||||
|
@ -50,12 +49,12 @@ parse ["--test"] = withCache $ withDBus_ evalConfig
|
||||||
parse _ = usage
|
parse _ = usage
|
||||||
|
|
||||||
run :: IO ()
|
run :: IO ()
|
||||||
run = withCache $ withDBus_ $ \db -> do
|
run = do
|
||||||
c <- evalConfig db
|
-- IDK why this is needed, I thought this was default
|
||||||
liftIO $ do
|
hSetBuffering stdout LineBuffering
|
||||||
-- this is needed to see any printed messages
|
withCache $ withDBus_ $ \db -> do
|
||||||
hFlush stdout
|
c <- evalConfig db
|
||||||
xmobar c
|
liftIO $ xmobar c
|
||||||
|
|
||||||
evalConfig :: DBusState -> FIO Config
|
evalConfig :: DBusState -> FIO Config
|
||||||
evalConfig db = do
|
evalConfig db = do
|
||||||
|
|
Loading…
Reference in New Issue