Skip to content

Generalize the Window Command

Steven Allen edited this page Jan 11, 2014 · 17 revisions

The purpose of this draft is to examine how we might generalize the window command to handle internal tree nodes.

Selector

Format: /[RF12pblrud]+.

R
    root

F
    focused node

1
    first child

2
    second child

p
    parent

b
    brother

l,r,u,d
    left, right, up, down edge

Example

window -e right RATIO would be written window /r -r RATIO removing the need for an --edge option.

/R12bu selects the up edge of the brother node of the second child of the first child of the root.

Behaviors

Focusing

  • Clear the input focus.
  • Perform the border drawing instructions on all the leaves of the subtree.
  • Stacking: stack each leaf?
  • Behavior of focus_follows_pointer?

Transferring

Swapping

Other Selectors:

Path based

Basically, treat the window tree as a filesystem (actually, you could make the interface a virtual filesystem but that's probably overkill...

.
|-- 1
|   |-- brother -> ../2
|   |-- dir
|   |   `-- right -> ../../2
|   `-- edges
|       |-- down
|       |-- left
|       |-- right
|       `-- up
|-- 2
|   |-- brother -> ../1
|   |-- dir
|   |   `-- left -> ../../1
|   `-- edges
|       |-- down
|       |-- left
|       |-- right
|       `-- up
|-- dir
`-- edges
    |-- down
    |-- left
    |-- right
    `-- up
Clone this wiki locally