diff options
Diffstat (limited to 'src/Xmobar/App')
| -rw-r--r-- | src/Xmobar/App/Main.hs | 7 | ||||
| -rw-r--r-- | src/Xmobar/App/Opts.hs | 2 | 
2 files changed, 6 insertions, 3 deletions
| diff --git a/src/Xmobar/App/Main.hs b/src/Xmobar/App/Main.hs index 3240df9..6eda49a 100644 --- a/src/Xmobar/App/Main.hs +++ b/src/Xmobar/App/Main.hs @@ -15,7 +15,7 @@  ------------------------------------------------------------------------------ -module Xmobar.App.Main (xmobar, xmobarMain) where +module Xmobar.App.Main (xmobar, xmobarMain, configFromArgs) where  import Control.Concurrent.Async (Async, cancel)  import Control.Exception (bracket) @@ -39,7 +39,7 @@ import Xmobar.Run.Template  import Xmobar.X11.Types  import Xmobar.X11.Text  import Xmobar.X11.Window -import Xmobar.App.Opts +import Xmobar.App.Opts (recompileFlag, verboseFlag, getOpts, doOpts)  import Xmobar.App.EventLoop (startLoop, startCommand)  import Xmobar.App.Compile (recompile, trace)  import Xmobar.App.Config @@ -62,6 +62,9 @@ xmobar conf = withDeferSignals $ do          ts = textOffsets conf ++ replicate (length fl) (-1)      startLoop (XConf d r w (fs:fl) (to:ts) ic conf) sig vars +configFromArgs :: Config -> IO Config +configFromArgs cfg = getArgs >>= getOpts >>= doOpts cfg . fst +  cleanupThreads :: [[([Async ()], a)]] -> IO ()  cleanupThreads vars =    for_ (concat vars) $ \(asyncs, _) -> diff --git a/src/Xmobar/App/Opts.hs b/src/Xmobar/App/Opts.hs index 07428d2..46a3ab6 100644 --- a/src/Xmobar/App/Opts.hs +++ b/src/Xmobar/App/Opts.hs @@ -14,7 +14,7 @@  --  ------------------------------------------------------------------------------ -module Xmobar.App.Opts where +module Xmobar.App.Opts (recompileFlag, verboseFlag, getOpts, doOpts) where  import Control.Monad (when)  import System.Console.GetOpt | 
