summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/System/Signal.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xmobar/System/Signal.hs')
-rw-r--r--src/Xmobar/System/Signal.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Xmobar/System/Signal.hs b/src/Xmobar/System/Signal.hs
index ce39e10..3983654 100644
--- a/src/Xmobar/System/Signal.hs
+++ b/src/Xmobar/System/Signal.hs
@@ -60,12 +60,11 @@ parseSignalType :: String -> Maybe SignalType
parseSignalType = fmap fst . safeHead . reads
-- | Signal handling
-setupSignalHandler :: IO (TMVar SignalType)
-setupSignalHandler = do
- tid <- newEmptyTMVarIO
+setupSignalHandler :: TMVar SignalType -> IO ()
+setupSignalHandler tid = do
installHandler sigUSR2 (Catch $ updatePosHandler tid) Nothing
installHandler sigUSR1 (Catch $ changeScreenHandler tid) Nothing
- return tid
+ return ()
updatePosHandler :: TMVar SignalType -> IO ()
updatePosHandler sig = do