Skip to content

Generalize the Window Command

Bastien Dejean edited this page Nov 23, 2015 · 17 revisions

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

Selector

Format: [DESKTOP_SEL:](/DIR)+.

/root
	root

/focused
	focused node

/first
	first child

/second
	second child

/parent
	parent

/brother
	brother

/{left,right,up,down}/{edge,child}
	left, right, up or down edge or child

Example

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

/root/first/second/brother/up/edge 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.
  • Don't perform any stacking operation.
  • Behavior of focus_follows_pointer?

Preselection

Instead of drawing the preselected region on the window border (which won't make sense if more that one window is focused) we will create preselection windows and draw to the background of those windows.

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