ENH run all of xmobar in rio

This commit is contained in:
Nathan Dwarshuis 2022-12-31 22:24:20 -05:00
parent f6c0596716
commit a997cac7a3
1 changed files with 6 additions and 5 deletions

View File

@ -50,13 +50,14 @@ parse ["--test"] = void $ withCache . evalConfig =<< connectDBus
parse _ = usage
run :: IO ()
run = do
run = withCache $ do
db <- connectDBus
c <- withCache $ evalConfig db
c <- evalConfig db
disconnectDBus db
-- this is needed to see any printed messages
hFlush stdout
xmobar c
liftIO $ do
-- this is needed to see any printed messages
hFlush stdout
xmobar c
evalConfig :: DBusState -> FIO Config
evalConfig db = do