[Xmonad] darcs patch: use a Layout to set the Screen rectangles.

David Roundy droundy at darcs.net
Wed Jun 20 09:54:58 EDT 2007


Hi all,

Here's a moderate-sized change that might be controversial.  I've replaced
xineScreens with a screenLayout that calls into Xinerama to get the screen
rectangles.  This has a couple of potential advantages.

One is that we could use this to move the gap treatment into XMonadContrib,
or at least out of XState, as we no longer require a special data structure
to store the gaps: it could just be a very simple Layout modifier.  I
believe this would simplify the core even if we don't move it entirely into
XMonadContrib (which is what I'd do, figuring that core should be only
things that either everyone needs or are both trivially small and something
that everyone needs *one* of.

It also (and this is why I wrote this) allows (with a separately sent
XMonadContrib module) those of us who only have one screen to pretend we've
got more than one screen.  So all developers can test and see how things
will behave (e.g. sticky-window code) under Xinerama.  And it also gives
users the ability to get something like a version of Combo that works with
tabs, and sort of emulates sticky windows.  I don't think it'd really a
long-term solution to either of those UI goals, but in the interim, it's
better than nothing.  It might even be enough to get me to upgrade at work
to the latest xmonad (I've been sticking with the one where Combo worked).

Anyhow, this is the first application of the more general Layout type.  It
expands the code a little bit, but if we use it to simplify gap handling,
that might be enough to compensate.

David

P.S. To reiterate, I think that the ability to test Xinerama behavior
easily is enough to make this patch worthwhile, particularly since that
seems to be a primary goal of xmonad, and it makes it tricky for those of
us who don't have that possibility to make changes to xmonad core that will
be acceptable.  e.g. many of us want sticky windows, but we hear that it'll
be hard with Xinerama, but folks with multiple screens don't seem to care,
presumably because they've already got sticky workspaces.

Wed Jun 20 06:36:03 PDT 2007  David Roundy <droundy at darcs.net>
  * use a Layout to set the Screen rectangles.
  An accompanying patch will allow those of us with only one physical screen
  to divide it into virtual screens at runtime.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 19678 bytes
Desc: A darcs patch for your repository!
Url : http://www.haskell.org/pipermail/xmonad/attachments/20070620/90d12188/attachment.bin


More information about the Xmonad mailing list