Discussion:
[xmonad] [xmonad-contrib] [PATCH] Improved BinarySpacePartition
Anton Pirogov
2015-03-12 15:11:50 UTC
Permalink
Hi everyone,

here is a patch adding following changes to the BSP layout:

Actions like Swap also affect the windows associated with the leaves,
leading to much more intuitive behaviour

Mouse support: through SetGeometry (e.g. MouseResize / BorderResize)

FocusParent action (like in i3): Without this sometimes it is simply
impossible to swap the elements one wants (e.g. when having 2 windows on
the left and 2 on the right, each in a split and wanting to swap these two
window pairs) and in other cases this is more convenient than having to
first focus something else to get the desired effect. With it the user can
apply actions not only to leafs but also to nodes, thereby being able to
manipulate splits that only contain other splits and no leafs (windows)

Equalize and Balance action: Equalize adjusts the ratios so that each
window occupies the same space, Balance retiles the layout if it gets too
complicated

Since my last mail (which received no reactions) I removed a lot of stuff
that was indeed possible with other layout modifiers. This patch contains
strictly new features and improvements to the layout.

Best regards,
Anton
Ben Weitzman
2015-03-13 17:42:47 UTC
Permalink
Awesome! This makes the BSP so much easier to use
Post by Anton Pirogov
Hi everyone,
Actions like Swap also affect the windows associated with the leaves,
leading to much more intuitive behaviour
Mouse support: through SetGeometry (e.g. MouseResize / BorderResize)
FocusParent action (like in i3): Without this sometimes it is simply
impossible to swap the elements one wants (e.g. when having 2 windows on
the left and 2 on the right, each in a split and wanting to swap these two
window pairs) and in other cases this is more convenient than having to
first focus something else to get the desired effect. With it the user can
apply actions not only to leafs but also to nodes, thereby being able to
manipulate splits that only contain other splits and no leafs (windows)
Equalize and Balance action: Equalize adjusts the ratios so that each
window occupies the same space, Balance retiles the layout if it gets too
complicated
Since my last mail (which received no reactions) I removed a lot of stuff
that was indeed possible with other layout modifiers. This patch contains
strictly new features and improvements to the layout.
Best regards,
Anton
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
adam vogt
2015-03-14 23:43:58 UTC
Permalink
Hi Anton,

Would you be able to address the warnings ghc -Wall spits out
http://lpaste.net/8937793665569390592 ?

For example you have an incomplete pattern for:

handleResize :: BinarySpacePartition Window -> WindowArrangerMsg -> X
(Maybe (BinarySpacePartition Window))

It would be better to write

handleResize :: BinarySpacePartition Window -> Rectangle -> X (Maybe
(BinarySpacePartition Window))
handleResize b (newRect @ Rectangle x y w h) = ...

Thanks,
Adam
Post by Anton Pirogov
Hi everyone,
Actions like Swap also affect the windows associated with the leaves,
leading to much more intuitive behaviour
Mouse support: through SetGeometry (e.g. MouseResize / BorderResize)
FocusParent action (like in i3): Without this sometimes it is simply
impossible to swap the elements one wants (e.g. when having 2 windows on
the left and 2 on the right, each in a split and wanting to swap these two
window pairs) and in other cases this is more convenient than having to
first focus something else to get the desired effect. With it the user can
apply actions not only to leafs but also to nodes, thereby being able to
manipulate splits that only contain other splits and no leafs (windows)
Equalize and Balance action: Equalize adjusts the ratios so that each
window occupies the same space, Balance retiles the layout if it gets too
complicated
Since my last mail (which received no reactions) I removed a lot of stuff
that was indeed possible with other layout modifiers. This patch contains
strictly new features and improvements to the layout.
Best regards,
Anton
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Anton Pirogov
2015-03-15 10:08:09 UTC
Permalink
Hi,

I fixed the warnings. I just used xmonad --recompile while developing, will
use ghc -Wall before submitting in the future, sorry for the inconvenience!

Best regards,
Anton
Post by adam vogt
Hi Anton,
Would you be able to address the warnings ghc -Wall spits out
http://lpaste.net/8937793665569390592 ?
handleResize :: BinarySpacePartition Window -> WindowArrangerMsg -> X
(Maybe (BinarySpacePartition Window))
It would be better to write
handleResize :: BinarySpacePartition Window -> Rectangle -> X (Maybe
(BinarySpacePartition Window))
Thanks,
Adam
Post by Anton Pirogov
Hi everyone,
Actions like Swap also affect the windows associated with the leaves,
leading to much more intuitive behaviour
Mouse support: through SetGeometry (e.g. MouseResize / BorderResize)
FocusParent action (like in i3): Without this sometimes it is simply
impossible to swap the elements one wants (e.g. when having 2 windows on
the left and 2 on the right, each in a split and wanting to swap these two
window pairs) and in other cases this is more convenient than having to
first focus something else to get the desired effect. With it the user can
apply actions not only to leafs but also to nodes, thereby being able to
manipulate splits that only contain other splits and no leafs (windows)
Equalize and Balance action: Equalize adjusts the ratios so that each
window occupies the same space, Balance retiles the layout if it gets too
complicated
Since my last mail (which received no reactions) I removed a lot of stuff
that was indeed possible with other layout modifiers. This patch contains
strictly new features and improvements to the layout.
Best regards,
Anton
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Carsten Mattner
2015-03-15 12:42:58 UTC
Permalink
Post by Anton Pirogov
Hi,
I fixed the warnings. I just used xmonad --recompile while developing, will
use ghc -Wall before submitting in the future, sorry for the inconvenience!
Isn't it possible to pass in an environment variable to extend the
GHC flags and enale -Wall during xmonad --recompile?
If there is it might be good idea to document it.
Post by Anton Pirogov
Best regards,
Anton
Post by adam vogt
Hi Anton,
Would you be able to address the warnings ghc -Wall spits out
http://lpaste.net/8937793665569390592 ?
handleResize :: BinarySpacePartition Window -> WindowArrangerMsg -> X
(Maybe (BinarySpacePartition Window))
It would be better to write
handleResize :: BinarySpacePartition Window -> Rectangle -> X (Maybe
(BinarySpacePartition Window))
Thanks,
Adam
Post by Anton Pirogov
Hi everyone,
Actions like Swap also affect the windows associated with the leaves,
leading to much more intuitive behaviour
Mouse support: through SetGeometry (e.g. MouseResize / BorderResize)
FocusParent action (like in i3): Without this sometimes it is simply
impossible to swap the elements one wants (e.g. when having 2 windows on the
left and 2 on the right, each in a split and wanting to swap these two
window pairs) and in other cases this is more convenient than having to
first focus something else to get the desired effect. With it the user can
apply actions not only to leafs but also to nodes, thereby being able to
manipulate splits that only contain other splits and no leafs (windows)
Equalize and Balance action: Equalize adjusts the ratios so that each
window occupies the same space, Balance retiles the layout if it gets too
complicated
Since my last mail (which received no reactions) I removed a lot of stuff
that was indeed possible with other layout modifiers. This patch contains
strictly new features and improvements to the layout.
Best regards,
Anton
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
adam vogt
2015-03-15 14:16:49 UTC
Permalink
You can enable warnings by adding a pragma

{-# OPTIONS_GHC -Wall #-}
Post by Anton Pirogov
Post by Anton Pirogov
Hi,
I fixed the warnings. I just used xmonad --recompile while developing,
will
Post by Anton Pirogov
use ghc -Wall before submitting in the future, sorry for the
inconvenience!
Isn't it possible to pass in an environment variable to extend the
GHC flags and enale -Wall during xmonad --recompile?
If there is it might be good idea to document it.
Post by Anton Pirogov
Best regards,
Anton
Post by adam vogt
Hi Anton,
Would you be able to address the warnings ghc -Wall spits out
http://lpaste.net/8937793665569390592 ?
handleResize :: BinarySpacePartition Window -> WindowArrangerMsg -> X
(Maybe (BinarySpacePartition Window))
It would be better to write
handleResize :: BinarySpacePartition Window -> Rectangle -> X (Maybe
(BinarySpacePartition Window))
Thanks,
Adam
On Thu, Mar 12, 2015 at 11:11 AM, Anton Pirogov <
Post by Anton Pirogov
Hi everyone,
Actions like Swap also affect the windows associated with the leaves,
leading to much more intuitive behaviour
Mouse support: through SetGeometry (e.g. MouseResize / BorderResize)
FocusParent action (like in i3): Without this sometimes it is simply
impossible to swap the elements one wants (e.g. when having 2 windows
on the
Post by Anton Pirogov
Post by adam vogt
Post by Anton Pirogov
left and 2 on the right, each in a split and wanting to swap these two
window pairs) and in other cases this is more convenient than having to
first focus something else to get the desired effect. With it the user
can
Post by Anton Pirogov
Post by adam vogt
Post by Anton Pirogov
apply actions not only to leafs but also to nodes, thereby being able
to
Post by Anton Pirogov
Post by adam vogt
Post by Anton Pirogov
manipulate splits that only contain other splits and no leafs (windows)
Equalize and Balance action: Equalize adjusts the ratios so that each
window occupies the same space, Balance retiles the layout if it gets
too
Post by Anton Pirogov
Post by adam vogt
Post by Anton Pirogov
complicated
Since my last mail (which received no reactions) I removed a lot of
stuff
Post by Anton Pirogov
Post by adam vogt
Post by Anton Pirogov
that was indeed possible with other layout modifiers. This patch
contains
Post by Anton Pirogov
Post by adam vogt
Post by Anton Pirogov
strictly new features and improvements to the layout.
Best regards,
Anton
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
adam vogt
2015-03-15 21:05:47 UTC
Permalink
Thanks Anton, I've pushed this one.
Post by Anton Pirogov
Hi,
I fixed the warnings. I just used xmonad --recompile while developing,
will use ghc -Wall before submitting in the future, sorry for the
inconvenience!
Best regards,
Anton
Post by adam vogt
Hi Anton,
Would you be able to address the warnings ghc -Wall spits out
http://lpaste.net/8937793665569390592 ?
handleResize :: BinarySpacePartition Window -> WindowArrangerMsg -> X
(Maybe (BinarySpacePartition Window))
It would be better to write
handleResize :: BinarySpacePartition Window -> Rectangle -> X (Maybe
(BinarySpacePartition Window))
Thanks,
Adam
Post by Anton Pirogov
Hi everyone,
Actions like Swap also affect the windows associated with the leaves,
leading to much more intuitive behaviour
Mouse support: through SetGeometry (e.g. MouseResize / BorderResize)
FocusParent action (like in i3): Without this sometimes it is simply
impossible to swap the elements one wants (e.g. when having 2 windows on
the left and 2 on the right, each in a split and wanting to swap these two
window pairs) and in other cases this is more convenient than having to
first focus something else to get the desired effect. With it the user can
apply actions not only to leafs but also to nodes, thereby being able to
manipulate splits that only contain other splits and no leafs (windows)
Equalize and Balance action: Equalize adjusts the ratios so that each
window occupies the same space, Balance retiles the layout if it gets too
complicated
Since my last mail (which received no reactions) I removed a lot of
stuff that was indeed possible with other layout modifiers. This patch
contains strictly new features and improvements to the layout.
Best regards,
Anton
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Loading...