diff --git a/src/QBar/Core.hs b/src/QBar/Core.hs index a280586654601a9011dc49b5a288044198942a9f..fd0ae51f2dca4f837320c5432be3789d8522693f 100644 --- a/src/QBar/Core.hs +++ b/src/QBar/Core.hs @@ -317,7 +317,7 @@ startPersistentBlockScript path = do fromHandle bar handle = forever $ do line <- lift $ TIO.hGetLine handle yield $ pangoMarkup $ createBlock line - lift $ updateBar'' bar + lift $ updateBar' bar pangoColor :: RGB Double -> T.Text pangoColor (RGB r g b) = @@ -342,11 +342,8 @@ addBlock block = do updateBar :: BarIO () updateBar = liftIO =<< asks requestBarUpdate -updateBar' :: BarUpdateChannel -> IO () -updateBar' (BarUpdateChannel updateAction) = updateAction - -updateBar'' :: Bar -> IO () -updateBar'' = updateBar' . BarUpdateChannel . requestBarUpdate +updateBar' :: Bar -> IO () +updateBar' = runReaderT updateBar barAsync :: BarIO a -> BarIO (Async a) barAsync action = do diff --git a/src/QBar/Server.hs b/src/QBar/Server.hs index 1229aa8de83a953ad5f85be3b8af2247bb44f97e..f6c5be96346084534cc129928fb78349b2569b4c 100644 --- a/src/QBar/Server.hs +++ b/src/QBar/Server.hs @@ -155,7 +155,7 @@ installSignalHandlers = do sigContAction :: Bar -> IO () sigContAction bar = do hPutStrLn stderr "SIGCONT received" - updateBar'' bar + updateBar' bar runBarConfiguration :: BarIO () -> MainOptions -> IO () runBarConfiguration generateBarConfig options = do @@ -210,7 +210,7 @@ runBarConfiguration generateBarConfig options = do case command of SetFilter blockFilter -> atomicWriteIORef activeFilter blockFilter Block -> error "TODO" - updateBar'' bar + updateBar' bar link socketUpdateAsync runReaderT (renderLoop options handle barUpdateEvent initialOutput newBlockChan) bar