From 536273a9d980cf3e71d8d05813e18b3ebcaf9233 Mon Sep 17 00:00:00 2001 From: Jochen Keil Date: Wed, 8 Aug 2012 20:02:43 +0200 Subject: Extend the interface so that plugins can send signals Also: realign methods to look pretty again. --- src/Commands.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Commands.hs') diff --git a/src/Commands.hs b/src/Commands.hs index 1bfbb94..f31c53c 100644 --- a/src/Commands.hs +++ b/src/Commands.hs @@ -30,6 +30,8 @@ import Data.Char import System.Process import System.Exit import System.IO (hClose) + +import Signal import XUtil class Show e => Exec e where @@ -42,6 +44,8 @@ class Show e => Exec e where start :: e -> (String -> IO ()) -> IO () start e cb = go where go = run e >>= cb >> tenthSeconds (rate e) >> go + trigger :: e -> (Maybe SignalType -> IO ()) -> IO () + trigger _ sh = sh Nothing data Command = Com Program Args Alias Rate deriving (Show,Read,Eq) -- cgit v1.2.3