summaryrefslogtreecommitdiffstats
path: root/tv/2configs/xserver/xmonad-tv/Util/Debunk.hs
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-10-24 22:09:55 +0200
committertv <tv@shackspace.de>2015-10-24 22:09:55 +0200
commitb2deab26bd52a994003cafc33872b6c084cdd716 (patch)
tree6b0229398751afba432076d087925a034bff5337 /tv/2configs/xserver/xmonad-tv/Util/Debunk.hs
parenta01651485b21501df2f602c67381a1f5e9ce656b (diff)
tv: nano really is just vim
This is required or else we have to modify glorious packages like cvs.
Diffstat (limited to 'tv/2configs/xserver/xmonad-tv/Util/Debunk.hs')
-rw-r--r--tv/2configs/xserver/xmonad-tv/Util/Debunk.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tv/2configs/xserver/xmonad-tv/Util/Debunk.hs b/tv/2configs/xserver/xmonad-tv/Util/Debunk.hs
new file mode 100644
index 000000000..b4772e582
--- /dev/null
+++ b/tv/2configs/xserver/xmonad-tv/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
+