[Xmonad] darcs patch: Wrap log output in a configurable type.
Donald Bruce Stewart
dons at cse.unsw.edu.au
Tue Jun 5 23:11:00 EDT 2007
glasser:
> Tue Jun 5 10:14:33 EDT 2007 glasser at mit.edu
> * Wrap log output in a configurable type.
Content-Description: A darcs patch for your repository!
>
> New patches:
>
> [Wrap log output in a configurable type.
> glasser at mit.edu**20070605141433] {
> hunk ./Config.hs 109
> +--
> +-- If logging is enabled, xmonad prints out 'logWindowSet' applied to
> +-- the current window set. By default this is the identity; however,
> +-- if you'd like to be able to send other kinds of messages over
> +-- stdout, you can make this something else (perhaps something like
> +-- 'Either WindowSet CustomStatusBarCommand'). Note that you will
> +-- also need to adjust the LogRecord declaration in Config.hs-boot.
> +
> +type LogRecord = WindowSet
> +logWindowSet :: WindowSet -> LogRecord
> +logWindowSet = id
> +
> hunk ./Config.hs-boot 5
> +type LogRecord = WindowSet
> +logWindowSet:: WindowSet -> LogRecord
How about we just set the logging function itself in Config.hs?
logging :: WindowSet -> X ()
logging s = return () -- no logging
logging s = hPrint stdout -- normal
logging s = do e <- grabsomethingfun from XMonadContrib
hPrint in my own format (e,s)
?
-- Don
More information about the Xmonad
mailing list