diff options
author | jao <jao@gnu.org> | 2022-02-04 00:07:54 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-02-04 00:07:54 +0000 |
commit | 45fd6dc4dd71f752e25628d07a666aadc2e26e17 (patch) | |
tree | f79c0246be3822b73790748afa1ad1d172dab76a | |
parent | 1e9b9e068844454335bc9d4728cf738eb2b3ceed (diff) | |
download | xmobar-45fd6dc4dd71f752e25628d07a666aadc2e26e17.tar.gz xmobar-45fd6dc4dd71f752e25628d07a666aadc2e26e17.tar.bz2 |
Xmobar.App.CommandThreads -> Xmobar.Run.Loop
-rw-r--r-- | src/Xmobar/App/TextEventLoop.hs | 2 | ||||
-rw-r--r-- | src/Xmobar/App/X11EventLoop.hs | 2 | ||||
-rw-r--r-- | src/Xmobar/Run/Loop.hs (renamed from src/Xmobar/App/CommandThreads.hs) | 9 | ||||
-rw-r--r-- | src/Xmobar/X11/Parsers.hs | 6 | ||||
-rw-r--r-- | xmobar.cabal | 2 |
5 files changed, 9 insertions, 12 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) diff --git a/xmobar.cabal b/xmobar.cabal index 0b87d18..962d6b1 100644 --- a/xmobar.cabal +++ b/xmobar.cabal @@ -115,7 +115,7 @@ library Xmobar.Run.Exec, Xmobar.Run.Runnable Xmobar.Run.Actions, - Xmobar.App.CommandThreads, + Xmobar.Run.Loop, Xmobar.App.X11EventLoop, Xmobar.App.TextEventLoop, Xmobar.App.Config, |