summaryrefslogtreecommitdiffhomepage
path: root/src/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 4c3f351..c7045b5 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -36,6 +36,8 @@ import System.Environment
import System.Posix.Files
import Control.Monad (unless)
+import Signal (setupSignalHandler, SignalType(..))
+
-- $main
-- | The main entry point
@@ -55,9 +57,10 @@ main = do
conf <- doOpts c o
fs <- initFont d (font conf)
cls <- mapM (parseTemplate conf) (splitTemplate conf)
- vars <- mapM (mapM startCommand) cls
+ sig <- setupSignalHandler
+ vars <- mapM (mapM $ startCommand sig) cls
(r,w) <- createWin d fs conf
- startLoop (XConf d r w fs conf) vars
+ startLoop (XConf d r w fs conf) sig vars
-- | Splits the template in its parts
splitTemplate :: Config -> [String]