From 6ecbc80109cd0136518cddb23bf26f057a39308d Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 28 Mar 2022 10:51:02 -0600 Subject: Move Intercept to RebindKeys. Remove the intercept subsystem as it was experimental and I do not have a real use for it anymore. --- src/Internal/Logger.hs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/Internal/Logger.hs') diff --git a/src/Internal/Logger.hs b/src/Internal/Logger.hs index f1960fb..cc52c7e 100644 --- a/src/Internal/Logger.hs +++ b/src/Internal/Logger.hs @@ -4,17 +4,13 @@ import XMonad import qualified XMonad.Util.ExtensibleState as XS import System.IO +import Internal.NoPersist + data LoggerState = LoggerState { - logHandle :: Maybe Handle + logHandle :: Maybe (NoPersist Handle) } -instance Read LoggerState where - readsPrec i s = map (\(_, s) -> (LoggerState Nothing, s)) (readsPrec i s :: [((), String)]) - -instance Show LoggerState where - show _ = show () - instance ExtensionClass LoggerState where initialValue = LoggerState Nothing @@ -26,10 +22,10 @@ logs s = do case handle' of Nothing -> do handle <- io $ openFile "/tmp/xmonad.log" AppendMode - XS.put $ LoggerState (Just handle) + XS.put $ LoggerState $ Just $ NoPersist handle return handle - Just h -> return h + Just (NoPersist h) -> return h io $ do hPutStrLn handle s -- cgit