[xmonad] Re: Config File Format
Braden Shepherdson
Braden.Shepherdson at gmail.com
Thu May 15 18:46:40 EDT 2008
Devin Mullins wrote:
> Hi all (long time no see),
>
> There's been chatter about a *shudder* GUI configurator, primarily
> because people are having trouble with xmonad.hs. Observing some of the
> syntax troubles people are having, I think there are some easy wins we
> can make with xmonad.hs, before resorting to GUI.
I have to think a more important goal for a non-xmonad.hs configuration
system would be independence of GHC. Simplification is a secondary
benefit, more a side effect of removing the unfamiliar syntax.
> main = xmonad $ defaultConfig
> <:> modMask <=> mod4Mask
> <:> terminal <=> "urxvt"
> <:> layout <+> simpleTabbed
> <:> layoutHook <+> smartBorders
> <:> keys <-> "M-b"
> <:> global <+> withUrgencyHook dzenUrgencyHook ["-bg", "darkgreen"]
>
> ... snip ...
>
> All this by means of saying: I'm thinking of adding this to EZConfig,
> but if there's stronger interest in this, I won't, and we can make the
> change to core (to prevent confusion). Perhaps EZConfig is the best way,
> though. Let it settle in and see whether it's actually useful for newbs.
> Thoughts?
I started some of this thinking a few months ago by proposing and then
setting out to write what has become PlainConfig, a plain-text
configuration file for configuring xmonad. It's done for all the core
configuration, and could be easily extended to use some common bits of
XMC. There's talk of a release in the near future, so it hasn't been
pulled into the xmonad codebase yet.
But the principal goal is not simplification of configuration so much as
removing the GHC dependency. The target users here are people
downloading the Debian or Ubuntu packages for xmonad, who'd like to
change their mod key to Windows instead of the massively overloaded left
alt default. Whoops, they need to install GHC, get the template
xmonad.hs, make the change, and get it compiling. If someone just wanted
to "try it out", do you think they'd continue?
But if the process was "create ~/.xmonad/xmonad.conf, and put the line
'modMask = 4' in it, then press mod+q", that's not a big deal.
Simplification comes along with this, at the obvious cost of vastly
reduced flexibility and power. That's why none of these alternative
configuration ideas can really replace xmonad.hs files. I certainly
won't be using PlainConfig myself, I have some complex keybindings I
want to continue using. But J. Random Ubuntu User doesn't want to
install GHC just so he can use left alt again.
On the philosophical front, I think there might be some fundamental
differences of viewpoint. I am entirely unwilling to sacrifice the
control that xmonad.hs files give me, and I would fight very hard
against their removal.
But I also think that every new xmonad user is a win, whether they be a
master Haskeller like Yitz Gale or some Ubuntu user who hadn't heard of
Haskell before reading that xmonad was written in it. The latter doesn't
want the power of xmonad.hs files, certainly not right away. He wants a
fairly obvious way to change some basics like mod keys, the default
terminal, maybe use blue borders or add a keybinding to spawn Firefox.
Someday later, he'll want window copying or some other feature, and will
come to #xmonad. And we'll say, "oh, you need to get GHC and use this
contrib module", the same as we do now.
Finally, about a GUI configurator. I must admit I don't like that idea,
but I would at least suggest that such a tool be based on PlainConfig or
built similarly, to not require GHC.
Braden Shepherdson
shepheb
More information about the xmonad
mailing list