stockholm/tv/2configs/xserver/xmonad-tv/Util/Debunk.hs
tv b2deab26bd tv: nano really is just vim
This is required or else we have to modify glorious packages like cvs.
2015-10-24 22:09:55 +02:00

17 lines
389 B
Haskell

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