summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Xmobar/App/TextEventLoop.hs2
-rw-r--r--src/Xmobar/App/X11EventLoop.hs2
-rw-r--r--src/Xmobar/Run/Loop.hs (renamed from src/Xmobar/App/CommandThreads.hs)9
-rw-r--r--src/Xmobar/X11/Parsers.hs6
4 files changed, 8 insertions, 11 deletions
diff --git a/src/Xmobar/App/TextEventLoop.hs b/src/Xmobar/App/TextEventLoop.hs
index e516298..ad7c33b 100644
--- a/src/Xmobar/App/TextEventLoop.hs
+++ b/src/Xmobar/App/TextEventLoop.hs
@@ -28,8 +28,8 @@ import Control.Concurrent.STM
import Xmobar.System.Signal
import Xmobar.Config.Types (Config(textOutputFormat), TextOutputFormat(..))
+import Xmobar.Run.Loop (initLoop, loop)
import Xmobar.X11.Parsers (Segment, Widget(..), parseString, tColorsString, colorComponents)
-import Xmobar.App.CommandThreads (initLoop, loop)
-- | Starts the main event loop and threads
textLoop :: Config -> IO ()
diff --git a/src/Xmobar/App/X11EventLoop.hs b/src/Xmobar/App/X11EventLoop.hs
index b8897b5..662c777 100644
--- a/src/Xmobar/App/X11EventLoop.hs
+++ b/src/Xmobar/App/X11EventLoop.hs
@@ -59,7 +59,7 @@ import Xmobar.X11.Bitmap as Bitmap
import Xmobar.X11.Types
import Xmobar.System.Utils (safeIndex)
-import Xmobar.App.CommandThreads (initLoop, loop)
+import Xmobar.Run.Loop (initLoop, loop)
#ifndef THREADED_RUNTIME
import Xmobar.X11.Events(nextEvent')
diff --git a/src/Xmobar/App/CommandThreads.hs b/src/Xmobar/Run/Loop.hs
index 28bf926..30ee112 100644
--- a/src/Xmobar/App/CommandThreads.hs
+++ b/src/Xmobar/Run/Loop.hs
@@ -2,7 +2,7 @@
------------------------------------------------------------------------------
-- |
--- Module: Xmobar.App.CommandThreads
+-- Module: Xmobar.Run.Loop
-- Copyright: (c) 2022 Jose Antonio Ortega Ruiz
-- License: BSD3-style (see LICENSE)
--
@@ -12,14 +12,11 @@
-- Created: Fri Jan 28, 2022 03:20
--
--
--- Running a thread for each defined Command
+-- Running a thread for each defined Command in a loop
--
------------------------------------------------------------------------------
-module Xmobar.App.CommandThreads ( initLoop
- , loop
- , newRefreshLock
- , refreshLock) where
+module Xmobar.Run.Loop (initLoop, loop) where
import Control.Concurrent (forkIO)
import Control.Exception (bracket_, bracket, handle, SomeException(..))
diff --git a/src/Xmobar/X11/Parsers.hs b/src/Xmobar/X11/Parsers.hs
index 4688760..4a7e4eb 100644
--- a/src/Xmobar/X11/Parsers.hs
+++ b/src/Xmobar/X11/Parsers.hs
@@ -24,9 +24,6 @@ module Xmobar.X11.Parsers ( parseString
, TextRenderInfo(..)
, Widget(..)) where
-import Xmobar.Config.Types
-import Xmobar.Run.Actions
-
import Control.Monad (guard, mzero)
import Data.Maybe (fromMaybe)
import Data.Int (Int32)
@@ -34,6 +31,9 @@ import Text.ParserCombinators.Parsec
import Text.Read (readMaybe)
import Foreign.C.Types (CInt)
+import Xmobar.Config.Types
+import Xmobar.Run.Actions
+
data Widget = Icon String | Text String | Hspace Int32 deriving Show
data BoxOffset = BoxOffset Align Int32 deriving (Eq, Show)