diff options
author | lassulus <lass@aidsballs.de> | 2015-10-25 21:27:14 +0100 |
---|---|---|
committer | lassulus <lass@aidsballs.de> | 2015-10-25 21:27:14 +0100 |
commit | cc5220a4477e290f1833e609fed1e0f9f56e4a41 (patch) | |
tree | f7032b6126c6daac3e2d2e5ad9c5d628a7a3e34a /tv/2configs/xserver/xmonad/Util/Debunk.hs | |
parent | ace11d79badafce313b17c968701739513e95982 (diff) | |
parent | cca25c7b66c44e0ec826d466bd48f2463df03fe9 (diff) |
Merge remote-tracking branch 'pnp/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 + |