From 0306ec4294f6d825ca65c7b0c98a80a3bced8fdf Mon Sep 17 00:00:00 2001 From: tv <tv@shackspace.de> Date: Sat, 24 Oct 2015 22:31:10 +0200 Subject: tv: lol display-manager --- tv/2configs/xserver/xmonad/Util/Debunk.hs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tv/2configs/xserver/xmonad/Util/Debunk.hs (limited to 'tv/2configs/xserver/xmonad/Util/Debunk.hs') 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 + -- cgit v1.2.3