diff options
author | makefu <github@syntax-fehler.de> | 2015-10-25 00:23:59 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2015-10-25 00:23:59 +0200 |
commit | c62885a0bcf4a1a09400aa69d83723857ab558d8 (patch) | |
tree | 2df3980c179c8da1ffb584fe9dd73f66da09d347 /tv/2configs/xserver/xmonad/Util/Debunk.hs | |
parent | a1d05482e5527d32baef9d9343b900dee8d46694 (diff) | |
parent | a4d7f920bf49de6237191558d02b0f58ed307fd4 (diff) |
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'tv/2configs/xserver/xmonad/Util/Debunk.hs')
-rw-r--r-- | tv/2configs/xserver/xmonad/Util/Debunk.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tv/2configs/xserver/xmonad/Util/Debunk.hs b/tv/2configs/xserver/xmonad/Util/Debunk.hs new file mode 100644 index 000000000..b4772e582 --- /dev/null +++ b/tv/2configs/xserver/xmonad/Util/Debunk.hs @@ -0,0 +1,16 @@ +module Util.Debunk + ( printToErrors + ) where + +import XMonad +import System.FilePath ( (</>) ) +import Control.Exception ( bracket ) +import System.IO ( hPrint, stderr, openFile, hClose, IOMode( AppendMode ) ) + + +printToErrors x = do + dir <- getXMonadDir + let base = dir </> "xmonad" + err = base ++ ".errors" + bracket (openFile err AppendMode) hClose $ \h -> hPrint h x + |