summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/App/Main.hs
diff options
context:
space:
mode:
authoralternateved <alternateved@gmail.com>2021-07-01 16:27:59 +0200
committeralternateved <alternateved@gmail.com>2021-07-01 16:27:59 +0200
commit12273cc0bf562b53d701fd0e8ccbbf67d40fd81b (patch)
tree0a554f0ff07be430b276662b63d628292f59afbc /src/Xmobar/App/Main.hs
parent2dfd285eb7cc6f28fde1201ccf5cf97a76e198d3 (diff)
downloadxmobar-12273cc0bf562b53d701fd0e8ccbbf67d40fd81b.tar.gz
xmobar-12273cc0bf562b53d701fd0e8ccbbf67d40fd81b.tar.bz2
Pass arguments if using xmobar.hs
Diffstat (limited to 'src/Xmobar/App/Main.hs')
-rw-r--r--src/Xmobar/App/Main.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Xmobar/App/Main.hs b/src/Xmobar/App/Main.hs
index b2bdc5c..16d5063 100644
--- a/src/Xmobar/App/Main.hs
+++ b/src/Xmobar/App/Main.hs
@@ -73,14 +73,14 @@ cleanupThreads vars =
for_ (concat vars) $ \(asyncs, _) ->
for_ asyncs cancel
-buildLaunch :: Bool -> Bool -> String -> ParseError -> IO ()
-buildLaunch verb force p e = do
+buildLaunch :: [String] -> Bool -> Bool -> String -> ParseError -> IO ()
+buildLaunch args verb force p e = do
let exec = takeBaseName p
confDir = takeDirectory p
ext = takeExtension p
if ext `elem` [".hs", ".hsc", ".lhs"]
then xmobarDataDir >>= \dd -> recompile confDir dd exec force verb >>
- executeFile (confDir </> exec) False [] Nothing
+ executeFile (confDir </> exec) False args Nothing
else trace True ("Invalid configuration file: " ++ show e) >>
trace True "\n(No compilation attempted: \
\only .hs, .hsc or .lhs files are compiled)"
@@ -106,5 +106,5 @@ xmobarMain = do
Just p -> do r <- readConfig defaultConfig p
case r of
Left e ->
- buildLaunch (verboseFlag flags) (recompileFlag flags) p e
+ buildLaunch args (verboseFlag flags) (recompileFlag flags) p e
Right (c, defs) -> doOpts c flags >>= xmobar' defs