[xmonad] New XMonad layout based on bspwm
adam vogt
vogt.adam at gmail.com
Thu May 1 17:32:01 UTC 2014
Hi Ben,
ExpandTowards R could mean something like "grow the current window,
preferably shrinking the one(s) to the right". Yes it might be
counterintuitive, but my opinion is that a layout should do something
somewhat sensible instead of nothing. I don't mind if that's a
separate message. To expand on my suggestion earlier, you might add a
message:
data ModifyTree = ModifyTree (Zipper Split -> Maybe (Zipper Split))
>From which it would be straightforward to make up a "counterintuitive"
keybindings with something like:
moveABorderToTheLeft :: X ()
moveABorderToTheLeft = sendMessage $
ModifyTree $ msum [
expandTreeTowards L,
shrinkTreeTowards R]
Possibly make an instance Monoid ModifyTree that does what the
MonadPlus instance used above does, and then it could be a pretty as:
("M-<Left>", sendMessage (expandTreeTowards' L <> shrinkTreeTowards' R)),
where expandTreeTowards' :: Direction2D -> ModifyTree is exported by
the BSP module.
Regards,
Adam
On Wed, Apr 30, 2014 at 10:21 PM, Ben Weitzman <benweitzman at gmail.com> wrote:
> Thanks Adam,
>
> First of all, thanks for the name conflict info. Even after a year with
> XMonad there are still lots of things I don't know :)
>
> Could you clarify why you think ExpandTowards R should do something if the
> window is up against the right edge? It seems like it might be
> counterintuitive for a window to grow towards the left if it can't grow
> towards the right. Perhaps a more general Expand or Expand
> Vertical/Horizontal message would be helpful?
>
> Ben
>
>
> On Wed, Apr 30, 2014 at 9:54 PM, adam vogt <vogt.adam at gmail.com> wrote:
>>
>> Hello Ben,
>>
>> I've applied it. I've changed Bound to XMonad.Util.Types.Direction2D.
>> Swap conflicts with the Swap in XMonad.Layout.WindowNavigation, but I
>> dunno if it's worth giving it an odd name (Exchange or SwapBSP) to
>> help a few people avoid qualified imports.
>>
>> Ideally the ExpandTowards R message should do something when the
>> window is already the right-most window on the screen. Probably that
>> action should be what ShrinkTowards L does. Or maybe it should be what
>> ExpandTowards L does. One way to get around that configuration mess is
>> have the message include a function.
>>
>> There are other layouts (Mosaic and MosaicAlt) in contrib that also
>> recursively split areas in half. It might be nice to switch between a
>> more automatically balanced tree (Mosaic) and one in which the layout
>> is more "under your control".
>>
>> Regards,
>> Adam
>>
>> On Wed, Apr 30, 2014 at 5:17 PM, Ben Weitzman <benweitzman at gmail.com>
>> wrote:
>> > Hi,
>> >
>> > I've written a binary space partition layout based of bspwm. Each time a
>> > window is inserted, it splits the current window into two. You can
>> > resize,
>> > rotate, and swap the leafs of the BSP tree around.
>> >
>> > Attached is the darcs patch.
>> >
>> > Cheers,
>> > Ben
>> >
>> > _______________________________________________
>> > xmonad mailing list
>> > xmonad at haskell.org
>> > http://www.haskell.org/mailman/listinfo/xmonad
>> >
>
>
More information about the xmonad
mailing list