diff options
| author | Josh Rahm <rahm@google.com> | 2022-03-28 10:51:02 -0600 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2022-03-28 10:51:02 -0600 |
| commit | 3a87706dc6193636c8b5c5b37d1ca2d057a22f00 (patch) | |
| tree | 47cff87ba7ae9b2e1dc1ccc00013b4ad2f99e0ca /src/Internal/Logger.hs | |
| parent | 19b26eaa2e72e3917bd4531a3e467cf58a721ac2 (diff) | |
| download | rde-3a87706dc6193636c8b5c5b37d1ca2d057a22f00.tar.gz rde-3a87706dc6193636c8b5c5b37d1ca2d057a22f00.tar.bz2 rde-3a87706dc6193636c8b5c5b37d1ca2d057a22f00.zip | |
Move Intercept to RebindKeys. Remove the intercept subsystem as it was experimental and I do not have a real use for it anymore.
Diffstat (limited to 'src/Internal/Logger.hs')
| -rw-r--r-- | src/Internal/Logger.hs | 14 |
1 files changed, 5 insertions, 9 deletions
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 |