ENH run all of xmobar in rio
This commit is contained in:
parent
f6c0596716
commit
a997cac7a3
|
@ -50,13 +50,14 @@ parse ["--test"] = void $ withCache . evalConfig =<< connectDBus
|
||||||
parse _ = usage
|
parse _ = usage
|
||||||
|
|
||||||
run :: IO ()
|
run :: IO ()
|
||||||
run = do
|
run = withCache $ do
|
||||||
db <- connectDBus
|
db <- connectDBus
|
||||||
c <- withCache $ evalConfig db
|
c <- evalConfig db
|
||||||
disconnectDBus db
|
disconnectDBus db
|
||||||
-- this is needed to see any printed messages
|
liftIO $ do
|
||||||
hFlush stdout
|
-- this is needed to see any printed messages
|
||||||
xmobar c
|
hFlush stdout
|
||||||
|
xmobar c
|
||||||
|
|
||||||
evalConfig :: DBusState -> FIO Config
|
evalConfig :: DBusState -> FIO Config
|
||||||
evalConfig db = do
|
evalConfig db = do
|
||||||
|
|
Loading…
Reference in New Issue