darcs patch: improve XMonad.Layout.Mosaic

It seems more useful to have the list of relative sizes (the only argument to the Mosaic constructor) to represent the master window by the first element, the window just below the master as the second, until either that list runs out, or there are no more windows. Now it is possible to behave like Tall's resizing with:
Mosaic [3,1,1,1,1,1,1]
having a function that just changes the first element of the list; using for illustration (clearly the empty list case should be handled);
sendMessage (SlopeMod (\(x:xs) -> x*2:xs))
In the previous scheme, we didn't know which element of the list represented the size of the Master. -- Adam

Applied.
* vogt.adam@gmail.com
It seems more useful to have the list of relative sizes (the only argument to the Mosaic constructor) to represent the master window by the first element, the window just below the master as the second, until either that list runs out, or there are no more windows.
Now it is possible to behave like Tall's resizing with:
Mosaic [3,1,1,1,1,1,1]
having a function that just changes the first element of the list; using for illustration (clearly the empty list case should be handled);
sendMessage (SlopeMod (\(x:xs) -> x*2:xs))
In the previous scheme, we didn't know which element of the list represented the size of the Master.
-- Adam
-- Roman I. Cheplyaka (aka Feuerbach @ IRC) http://ro-che.info/docs/xmonad.hs

* vogt.adam@gmail.com
It seems more useful to have the list of relative sizes (the only argument to the Mosaic constructor) to represent the master window by the first element, the window just below the master as the second, until either that list runs out, or there are no more windows.
In the previous scheme, we didn't know which element of the list represented the size of the Master.
-- Adam
Nice! I must say I /really/ like this layout; it gives me a way to automate laying out the resizable Tall variants I seem to have settled into, but without having to banish boring windows to other workspaces. (By using three or four appropriate list elements.) Ugh, now I'll probably waste time playing with slopeMod, though. ;-) Thanks for a great layout, Adam. -- wmw

* On Sunday, February 08 2009, Wirt Wolff wrote:
Nice! I must say I /really/ like this layout; it gives me a way to automate laying out the resizable Tall variants I seem to have settled into, but without having to banish boring windows to other workspaces. (By using three or four appropriate list elements.)
Great! Now at least 2 people use it :)
Ugh, now I'll probably waste time playing with slopeMod, though. ;-)
If you come up with something interesting, please add those functions to the module (as a darcs patch will get it in the fastest). Accidental negative elements cause some part of the algorithm to not terminate, so to prevent any unpleasant events, the elements are now treated as positive, even when they are not (with this quick patch). -- Adam
participants (4)
-
Adam Vogt
-
Roman Cheplyaka
-
vogt.adam@gmail.com
-
Wirt Wolff