summaryrefslogtreecommitdiffstats
path: root/tv/2configs/xserver/xmonad/Util/Debunk.hs
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-10-24 22:31:10 +0200
committertv <tv@shackspace.de>2015-10-24 22:31:10 +0200
commit0306ec4294f6d825ca65c7b0c98a80a3bced8fdf (patch)
treeeb9e3772407963c25a4d6bd8125b3a2a72bb29ca /tv/2configs/xserver/xmonad/Util/Debunk.hs
parentb2deab26bd52a994003cafc33872b6c084cdd716 (diff)
tv: lol display-manager
Diffstat (limited to 'tv/2configs/xserver/xmonad/Util/Debunk.hs')
-rw-r--r--tv/2configs/xserver/xmonad/Util/Debunk.hs16
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
+