diff options
-rw-r--r-- | src/Xmobar/App/Main.hs | 4 | ||||
-rw-r--r-- | src/Xmobar/Text/Loop.hs (renamed from src/Xmobar/App/TextEventLoop.hs) | 12 | ||||
-rw-r--r-- | xmobar.cabal | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/Xmobar/App/Main.hs b/src/Xmobar/App/Main.hs index c660a88..52cdca5 100644 --- a/src/Xmobar/App/Main.hs +++ b/src/Xmobar/App/Main.hs @@ -30,12 +30,12 @@ import Xmobar.App.Config import Xmobar.Config.Types import Xmobar.Config.Parse import qualified Xmobar.X11.Loop as X11 +import qualified Xmobar.Text.Loop as Text import Xmobar.App.Opts (recompileFlag, verboseFlag, getOpts, doOpts) -import Xmobar.App.TextEventLoop (textLoop) import Xmobar.App.Compile (recompile, trace) xmobar :: Config -> IO () -xmobar cfg = if textOutput cfg then textLoop cfg else X11.loop cfg +xmobar cfg = if textOutput cfg then Text.loop cfg else X11.loop cfg configFromArgs :: Config -> IO Config configFromArgs cfg = getArgs >>= getOpts >>= doOpts cfg . fst diff --git a/src/Xmobar/App/TextEventLoop.hs b/src/Xmobar/Text/Loop.hs index d41e1a7..244c165 100644 --- a/src/Xmobar/App/TextEventLoop.hs +++ b/src/Xmobar/Text/Loop.hs @@ -1,6 +1,6 @@ ------------------------------------------------------------------------------ -- | --- Module: Xmobar.App.TextEventLoop +-- Module: Xmobar.Text.Loop -- Copyright: (c) 2022 Jose Antonio Ortega Ruiz -- License: BSD3-style (see LICENSE) -- @@ -14,7 +14,7 @@ -- ------------------------------------------------------------------------------ -module Xmobar.App.TextEventLoop (textLoop) where +module Xmobar.Text.Loop (loop) where import Prelude hiding (lookup) import Text.Printf @@ -28,7 +28,7 @@ import Control.Concurrent.STM import Xmobar.System.Signal import Xmobar.Config.Types (Config(textOutputFormat), TextOutputFormat(..)) -import Xmobar.Run.Loop (initLoop, loop) +import qualified Xmobar.Run.Loop as Loop import Xmobar.Run.Parsers ( Segment , Widget(..) , parseString @@ -36,8 +36,8 @@ import Xmobar.Run.Parsers ( Segment , colorComponents) -- | Starts the main event loop and threads -textLoop :: Config -> IO () -textLoop conf = loop conf (startTextLoop' conf) +loop :: Config -> IO () +loop conf = Loop.loop conf (startTextLoop' conf) startTextLoop' :: Config -> TMVar SignalType @@ -47,7 +47,7 @@ startTextLoop' :: Config startTextLoop' cfg sig pauser vs = do hSetBuffering stdin LineBuffering hSetBuffering stdout LineBuffering - tv <- initLoop sig pauser vs + tv <- Loop.initLoop sig pauser vs eventLoop cfg tv sig -- | Continuously wait for a signal from a thread or a interrupt handler diff --git a/xmobar.cabal b/xmobar.cabal index 70ce0d0..0f3bdaa 100644 --- a/xmobar.cabal +++ b/xmobar.cabal @@ -117,7 +117,6 @@ library Xmobar.Run.Actions, Xmobar.Run.Parsers, Xmobar.Run.Loop, - Xmobar.App.TextEventLoop, Xmobar.App.Config, Xmobar.App.Main, Xmobar.App.Opts, @@ -128,6 +127,7 @@ library Xmobar.System.Localize, Xmobar.System.Signal, Xmobar.System.Kbd, + Xmobar.Text.Loop, Xmobar.X11.Events, Xmobar.X11.Loop, Xmobar.X11.Types, |