Refactor tree_next

- Makes `tree_next` not recursive.
- Adds `focus next|prev [sibling]` command. See (1.) and (2.) in
https://github.com/i3/i3/issues/2587#issuecomment-378505551 (Issue also
requests move command, not implemented here).
- Directional focus command now supports command criteria.

Wrapping is not implemented inside a floating container. This was also
true before the refactor so I am not changing it here.
This commit is contained in:
Orestis Floros
2018-09-14 18:34:43 +03:00
committed by Orestis Floros
parent f402f45702
commit bbc4c99c72
9 changed files with 295 additions and 162 deletions

View File

@ -2053,6 +2053,12 @@ parent::
child::
The opposite of +focus parent+, sets the focus to the last focused
child container.
next|prev::
Automatically sets focus to the adjacent container. If +sibling+ is
specified, the command will focus the exact sibling container,
including non-leaf containers like split containers. Otherwise, it is
an automatic version of +focus left|right|up|down+ in the orientation
of the parent container.
floating::
Sets focus to the last focused floating container.
tiling::
@ -2068,6 +2074,7 @@ output::
<criteria> focus
focus left|right|down|up
focus parent|child|floating|tiling|mode_toggle
focus next|prev [sibling]
focus output left|right|up|down|primary|<output>
----------------------------------------------