diff options
author | jao <jao@gnu.org> | 2025-02-11 04:40:34 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2025-02-11 04:40:34 +0000 |
commit | 298663bc0140a2b4877ec64b444b57521fb01716 (patch) | |
tree | a8b263627d2ccb74287d4166556a83306d9af7f8 /src/Xmobar/Run/Loop.hs | |
parent | 7390d759240785f660cbdb0ca55898732aa12c98 (diff) | |
download | xmobar-298663bc0140a2b4877ec64b444b57521fb01716.tar.gz xmobar-298663bc0140a2b4877ec64b444b57521fb01716.tar.bz2 |
prototype for onClick method in Exec
Diffstat (limited to 'src/Xmobar/Run/Loop.hs')
-rw-r--r-- | src/Xmobar/Run/Loop.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Xmobar/Run/Loop.hs b/src/Xmobar/Run/Loop.hs index bda41ff..3e2aa16 100644 --- a/src/Xmobar/Run/Loop.hs +++ b/src/Xmobar/Run/Loop.hs @@ -3,7 +3,7 @@ ------------------------------------------------------------------------------ -- | -- Module: Xmobar.Run.Loop --- Copyright: (c) 2022 Jose Antonio Ortega Ruiz +-- Copyright: (c) 2022, 2025 Jose Antonio Ortega Ruiz -- License: BSD3-style (see LICENSE) -- -- Maintainer: jao@gnu.org @@ -53,12 +53,12 @@ refreshLockT var action = do putTMVar var () return r -type LoopFunction = TMVar SignalType -> TVar [String] -> IO () +type LoopFunction = [Runnable] -> TMVar SignalType -> TVar [String] -> IO () loop :: Config -> LoopFunction -> IO () loop conf looper = withDeferSignals $ do cls <- mapM (parseTemplate (commands conf) (sepChar conf)) - (splitTemplate (alignSep conf) (template conf)) + (splitTemplate (alignSep conf) (template conf)) let confSig = unSignalChan (signal conf) sig <- maybe newEmptyTMVarIO pure confSig unless (isJust confSig) $ setupSignalHandler sig @@ -68,7 +68,7 @@ loop conf looper = withDeferSignals $ do cleanupThreads $ \vars -> do tv <- initLoop sig refLock vars - looper sig tv + looper (commands conf) sig tv cleanupThreads :: [[([Async ()], a)]] -> IO () cleanupThreads vars = |