diff options
author | jao <jao@gnu.org> | 2022-01-29 02:23:50 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-01-29 06:42:29 +0000 |
commit | 1af4da53f7f3b0bc9f0c337113a90448f035a4b1 (patch) | |
tree | 147c712bdd4507c08156a84ccd73c0d2430cf773 /src/Xmobar/App/TextEventLoop.hs | |
parent | 23399ceab6ca3fe9938cf97b7aa726258512be98 (diff) | |
download | xmobar-1af4da53f7f3b0bc9f0c337113a90448f035a4b1.tar.gz xmobar-1af4da53f7f3b0bc9f0c337113a90448f035a4b1.tar.bz2 |
App.EventLoop -> App.X11EventLoop
Diffstat (limited to 'src/Xmobar/App/TextEventLoop.hs')
-rw-r--r-- | src/Xmobar/App/TextEventLoop.hs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/Xmobar/App/TextEventLoop.hs b/src/Xmobar/App/TextEventLoop.hs index 6135554..4980bf1 100644 --- a/src/Xmobar/App/TextEventLoop.hs +++ b/src/Xmobar/App/TextEventLoop.hs @@ -14,7 +14,7 @@ -- ------------------------------------------------------------------------------ -module Xmobar.App.TextEventLoop (startTextLoop) where +module Xmobar.App.TextEventLoop (textLoop) where import Prelude hiding (lookup) @@ -26,15 +26,18 @@ import Control.Concurrent.STM import Xmobar.System.Signal import Xmobar.Config.Types (Config) import Xmobar.X11.Parsers (Segment, Widget(..), parseString) -import Xmobar.App.CommandThreads (initLoop) +import Xmobar.App.CommandThreads (initLoop, loop) -- | Starts the main event loop and threads -startTextLoop :: Config - -> TMVar SignalType - -> TMVar () - -> [[([Async ()], TVar String)]] - -> IO () -startTextLoop cfg sig pauser vs = do +textLoop :: Config -> IO () +textLoop conf = loop conf (startTextLoop' conf) + +startTextLoop' :: Config + -> TMVar SignalType + -> TMVar () + -> [[([Async ()], TVar String)]] + -> IO () +startTextLoop' cfg sig pauser vs = do tv <- initLoop sig pauser vs eventLoop cfg tv sig |