diff options
| author | Josh Rahm <rahm@google.com> | 2022-03-28 10:51:02 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:45 -0600 |
| commit | 6ecbc80109cd0136518cddb23bf26f057a39308d (patch) | |
| tree | 47cff87ba7ae9b2e1dc1ccc00013b4ad2f99e0ca /src/Internal/Logger.hs | |
| parent | db91a7d1f64d244106144cfb9e8d26c3d8aaccbe (diff) | |
| download | rde-6ecbc80109cd0136518cddb23bf26f057a39308d.tar.gz rde-6ecbc80109cd0136518cddb23bf26f057a39308d.tar.bz2 rde-6ecbc80109cd0136518cddb23bf26f057a39308d.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 |