[xmonad] Re: Xmobar Plugin Development
Braden Shepherdson
Braden.Shepherdson at gmail.com
Tue Jul 15 01:06:43 EDT 2008
Fred Blasdel wrote:
> Interestingly, there's a module in the xmonad-contrib darcs that
> allows you to avoid the runtime ghc dependency (though you still need
> ghc to build the initial xmonad.hs, a debian packager could do that
> and make it global):
> http://code.haskell.org/XMonadContrib/XMonad/Config/PlainConfig.hs
>
> Unfortunately you can't import anything from xmonad-contrib without
> using ghc to rebuild the xmonad.hs (a debian packager could make the
> default import all nonconflicting modules when contrib is installed).
> You also can't currently use any layouts from contrib, but more
> worrying for xmobar you also can't use a logHook :(
PlainConfig is my creation. I originally built it after seeing online
and meeting in fellow undergraduates resistance to installing such a
massive dependency as GHC in order to experiment with xmonad.
So I wrote PlainConfig as a proof-of-concept for a text-only config
parser. It is capable, in principle, of creating the equivalent of any
xmonad.hs file. However, you can't use arbitrary contrib modules, they
would have to be added to the PlainConfig module's compiler first.
That said, it would be a fairly easy endeavour to write parsers for the
more popular contrib layouts and other miscellaneous modules
(EwmhDesktops, Prompt and CopyWindow come to mind) that people tend to use.
In the end, though, text and a simple compiler is no match for Haskell
and GHC as far as expressive power. PlainConfig was intended to be a
decent replacement for simple xmonad.hs files, allowing someone to
experiment and get a taste of xmonad without having to install GHC
first, and also without being at the mercy of the default config. It
would allow them to change their mod key, add workspaces and adjust
their keybindings, the standard things newcomers to xmonad want to do.
Though I imagine sooner or later most users would want some module or
other feature PlainConfig doesn't support and would switch to using
xmonad.hs files. To lower that barrier (having to install GHC makes it
high enough already!) I intend to create another back end for
PlainConfig so that instead of building an XConfig it outputs an
xmonad.hs equivalent to the text configuration file, for seamless migration.
If we intend to release this month and PlainConfig is a part of the
release plans, I should have a chance from Wednesday onward this week to
work on it.
> -- Fred
Braden Shepherdson
shepheb
More information about the xmonad
mailing list