28 Jul 2012 10:47

## Binary Space Partitioning Window Manager

```Hi,

I'm planning on writing a window manager with the following
characteristics:

- Windows are represented as the leaves of a binary tree.
- To each leaf corresponds exactly one window.
- The only nodes which can be focused are the leaves.
- The leaves are called *window nodes*.
- The other nodes are called *container nodes*.
- Only two methods of node insertion will be provided: *replace* and *pair*.

Example: insertion of a new node (number 4) into the given tree with the
*replace* method:

b                                   c
/ \                                 / \
3   a              -->              4   b
^  / \                              ^  / \
2   1                               3   a
/ \
2   1

+-------------------------+         +-------------------------+
|            |            |         |            |            |
|            |     2      |         |            |     3      |
|            |            |         |            |            |
|     3      |------------|   -->   |     4      |------------|
|     ^      |            |         |     ^      |     |      |
|            |     1      |         |            |  2  |  1   |
```

28 Jul 2012 11:12

### Re: Binary Space Partitioning Window Manager

```Greetings.

On Sat, 28 Jul 2012 11:12:21 +0200 Bastien Dejean <nihilhill <at> gmail.com> wrote:
> Hi,
>
> I'm planning on writing a window manager with the following
> characteristics:
>
> - Windows are represented as the leaves of a binary tree.
> - To each leaf corresponds exactly one window.
> - The only nodes which can be focused are the leaves.
> - The leaves are called *window nodes*.
> - The other nodes are called *container nodes*.
> - Only two methods of node insertion will be provided: *replace* and *pair*.
> [...]
> - Each container node is a split rectangle.
> - The splitting method of a container node is either *automatic* or *manual*.
> - In the *automatic* splitting mode, the split type is vertical if the width of
>   the rectangle of the node is greater that its height and horizontal
>   otherwise.
> - Several tree transformations will be provided: directional leaf swap, node
>   pulling, rotation, contraction, dilatation...
> [...]

What  are the practical and productivity gains you expect from such fea‐
tures? What is your reallife example where such features would be  need‐
ed?

Sincerely,

```

28 Jul 2012 13:37

### Re: Binary Space Partitioning Window Manager

```Christoph Lohmann:

> What  are the practical and productivity gains you expect from such fea‐
> tures? What is your reallife example where such features would be  need‐
> ed?

Hyphenated plain text is... a catastrophe.

```
28 Jul 2012 13:54

### Re: Binary Space Partitioning Window Manager

```Greetings.

On Sat, 28 Jul 2012 13:54:07 +0200 Bastien Dejean <nihilhill <at> gmail.com> wrote:
> Christoph Lohmann:
>
> > What  are the practical and productivity gains you expect from such fea‐
> > tures? What is your reallife example where such features would be  need‐
> > ed?
>
> Hyphenated plain text is... a catastrophe.

No.

Sincerely,

Christoph Lohmann

```
30 Jul 2012 15:18

### Re: Binary Space Partitioning Window Manager

```Christoph Lohmann <20h <at> r-36.net> writes:

> Greetings.
>
> On Sat, 28 Jul 2012 13:54:07 +0200 Bastien Dejean <nihilhill <at> gmail.com> wrote:
>> Christoph Lohmann:
>>
>> > What  are the practical and productivity gains you expect from such fea‐
>> > tures? What is your reallife example where such features would be  need‐
>> > ed?
>>
>> Hyphenated plain text is... a catastrophe.
>
> No.

What are the practical and productivity gains you expect from such
features?  What is your reallife example where such features would be
needed?

--

--
Christian Neukirchen  <chneukirchen <at> gmail.com>  http://chneukirchen.org

```
30 Jul 2012 16:26

### Re: Re: Binary Space Partitioning Window Manager

```Greetings.

On Mon, 30 Jul 2012 16:26:38 +0200 Christian Neukirchen <chneukirchen <at> gmail.com> wrote:
> Christoph Lohmann <20h <at> r-36.net> writes:
>
> > On Sat, 28 Jul 2012 13:54:07 +0200 Bastien Dejean <nihilhill <at> gmail.com> wrote:
> >> Hyphenated plain text is... a catastrophe.
> >
> > No.
>
> What are the practical and productivity gains you expect from such
> features?

Easier  readability and more pleasing aesthetics. A device that will is‐
sue electric shocks on top posting is just in the legislation process.

> What is your reallife example where such features would be
> needed?

When communicating with every person I know.

Sincerely,

Christoph Lohmann

```
30 Jul 2012 16:42

### Re: Re: Binary Space Partitioning Window Manager

```On Mon, Jul 30, 2012 at 04:26:38PM +0200, Christoph Lohmann wrote:
> Greetings.
>
> On Mon, 30 Jul 2012 16:26:38 +0200 Christian Neukirchen <chneukirchen <at> gmail.com> wrote:
> > Christoph Lohmann <20h <at> r-36.net> writes:
> >
> > > On Sat, 28 Jul 2012 13:54:07 +0200 Bastien Dejean <nihilhill <at> gmail.com> wrote:
> > >> Hyphenated plain text is... a catastrophe.
> > >
> > > No.
> >
> > What are the practical and productivity gains you expect from such
> > features?
>
> Easier  readability and more pleasing aesthetics. A device that will is‐
> sue electric shocks on top posting is just in the legislation process.
>
> > What is your reallife example where such features would be
> > needed?
>
> When communicating with every person I know.
>
>
> Sincerely,
>
> Christoph Lohmann
>
>

what just happened here
```

28 Jul 2012 11:53

### Re: Binary Space Partitioning Window Manager

```Bastien Dejean <nihilhill <at> gmail.com> writes:

> Hi,
>
> I'm planning on writing a window manager with the following
> characteristics:
>
> - Windows are represented as the leaves of a binary tree.

You should look at herbstluftwm as it already imlements a binary tree
method for window management (manual tiling only).

-brandon

```
28 Jul 2012 13:45

### Re: Binary Space Partitioning Window Manager

```Brandon Invergo:

> You should look at herbstluftwm as it already imlements a binary tree
> method for window management (manual tiling only).

I'm actually an herbstluftwm contributor.

The problems I have with herbstluftwm's concepts should be easy to
deduce from the first message of this thread.

Cheers,
--

--
b.d
(| |)
^ ^

```
28 Jul 2012 12:15

### Re: Binary Space Partitioning Window Manager

```Quoth Bastien Dejean:
> I'm planning on writing a window manager with the following
> characteristics:
> ...

Sounds rather interesting, I approve, give it a go. Two potentiial
issues I see:

- It wouldn't interact too well with tagging. Presumably. Either
whole container nodes and their leaves would have to be assigned
tags, or each tag would have its own tree structure. The former
might actually not be a bad outcome.

- I can't imagine how the interface would work in a non-annoying
way. How would one choose the container to replace/pair to? Maybe
just doing it on whatever window was focused would be fine.

Anyway, ignore Christoph, he's just trying to push mediocrity.

Nick

```
28 Jul 2012 12:23

### Re: Binary Space Partitioning Window Manager

```Greetings.

On Sat, 28 Jul 2012 12:23:55 +0200 Nick <suckless-dev <at> njw.me.uk> wrote:
> Anyway, ignore Christoph, he's just trying to push mediocrity.

Elitism  needs  scientific analysis too. Just adding features because it
sounds cool will end you up in the same situation as Gnome.

Sincerely,

Christoph Lohmann

```
28 Jul 2012 13:39

### Re: Binary Space Partitioning Window Manager

```On Sat, Jul 28, 2012 at 11:15:48AM +0100, Nick wrote:
> Anyway, ignore Christoph, he's just trying to push mediocrity.

At least he runs hg push once in a while.  Where is the code?

```
28 Jul 2012 14:31

### Re: Binary Space Partitioning Window Manager

```Nick:

> Two potentiial
> issues I see:
>
> - It wouldn't interact too well with tagging. Presumably. Either
>   whole container nodes and their leaves would have to be assigned
>   tags, or each tag would have its own tree structure. The former
>   might actually not be a bad outcome.

I'm afraid I don't see how it could support tagging. Having one tree per
*desktop* seems to be the only option.

> - I can't imagine how the interface would work in a non-annoying
>   way. How would one choose the container to replace/pair to? Maybe
>   just doing it on whatever window was focused would be fine.

It is how I intend to do it (the '^' character in my ASCII drawings
indicates the focused window).

--

--
b.d
(| |)
^ ^

```
5 Aug 2012 13:51

### Re: Binary Space Partitioning Window Manager

```I have a wm which organizes windows into a tree, with windows as leaves,
and 'containers' as inner nodes.  a screen can be attached to any node,
and displays the subtree rooted there.  If the subtree is a leaf, the
window is fullscreen, otherwise, a few windows and containers are
displayed simultaneously.

I thought this would be nice both conceptually (since it generalizes
many other windowing paradigms) and organizationally (I could group
things into meaningful hierarchies).

In reality, it seems all this extra complication required some nice
tools to go along with it (to organize the trees, show minified windows,
etc), but this was all a lot more effort.  Consequently, I was left with
something more unwieldy.  Next time I write a wm, I'm going to try
a concept which is simple to implement, and most window operations
require just a few keystrokes (the arbitrary depth tree traversals
violated the 'few').

just saw thoughts, lest you waste time down similar paths (in the
tree..).

On Sat, Jul 28, 2012 at 10:47:58AM +0200, Bastien Dejean wrote:
> Hi,
>
> I'm planning on writing a window manager with the following
> characteristics:
>
> - Windows are represented as the leaves of a binary tree.
> - To each leaf corresponds exactly one window.
> - The only nodes which can be focused are the leaves.
```