summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-02-04 00:34:44 +0000
committerjao <jao@gnu.org>2022-02-04 00:34:44 +0000
commit34bb65029f0fdcb3f88043b3b0ca6ebd46bee161 (patch)
tree394331f1dd642bb4f149a82ee0e23b40b7fbd9ee
parentab47eb31b532c232255b2c2385160510145e40ba (diff)
downloadxmobar-34bb65029f0fdcb3f88043b3b0ca6ebd46bee161.tar.gz
xmobar-34bb65029f0fdcb3f88043b3b0ca6ebd46bee161.tar.bz2
Xmobar.App.TextEventLoop -> Xmobar.Text.Loop
-rw-r--r--src/Xmobar/App/Main.hs4
-rw-r--r--src/Xmobar/Text/Loop.hs (renamed from src/Xmobar/App/TextEventLoop.hs)12
-rw-r--r--xmobar.cabal2
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,