From 298663bc0140a2b4877ec64b444b57521fb01716 Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 11 Feb 2025 04:40:34 +0000 Subject: prototype for onClick method in Exec --- src/Xmobar/Run/Loop.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Xmobar/Run/Loop.hs') 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 = -- cgit v1.2.3