[xmonad] Re: Config File Format

Joachim Breitner mail at joachim-breitner.de
Fri May 16 06:41:06 EDT 2008


Am Donnerstag, den 15.05.2008, 22:09 -0600 schrieb Justin Bogner:
> Braden Shepherdson wrote:
> I don't see why a ghc dependency is a big deal in environments like 
> debian and ubuntu, other than the fact that they lagged way behind on 
> versions until recently. The overhead of installing ghc in order to edit 
> the config is similar to the overhead of installing, say, python so that 
> you can run a python app. Disk space is cheap and package management is 
> transparent these days.

It’s not cheap for everyone, ghc6 might be lagging behind on certain
architectures and I’m sure that some Debian users would like the
possibility of having a simple configuration file

> I kind of disapprove of there being more than one type of configuration 
> in the core, as I think it will just make things more confusing for new 
> users (and how do you deal with it if somebody uses both configurations? 
> Debugging new users' problems when they show up on irc is that much 
> harder, and thus discouraging).

It doesn’t have to be in the core. Something I’d welcome would be a
module (can be in contrib) that provides a function like:

parseSimpleConfig ::
   (LayoutClass l Window, Read (l Window)) => XConfig l -> IO (XConfig l)

which takes some defauls and modifies them according to the users’
configuration (if any).

Then the debian maintainer (happens to be me) could compile the system
wide /usr/bin/xmonad from this code:

import XMonad.Main (xmonad)
import XMonad.Something.SimpleConfig (parseSimpleConfig)

debianDefaults = XConfig {...}

main = parseSimpleConfig debianDefaults >>= xmonad

so users without any configuration get the debian Defaults, users with a
simple configuration get that (without ghc!), and users who want the
full flexibility can use ~/.xmonad/monad.hs as ususal.

So with the debian package maintainer had on, I’d welcome such a module,
and would probably use it in the Debian package.

Joachim Breitner
  e-Mail: mail at joachim-breitner.de
  Homepage: http://www.joachim-breitner.de
  ICQ#: 74513189
  Jabber-ID: nomeata at joachim-breitner.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://www.haskell.org/pipermail/xmonad/attachments/20080516/1dd27f41/attachment.bin

More information about the xmonad mailing list