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

@ -146,6 +146,8 @@ state WORKSPACE_NUMBER:
state FOCUS:
direction = 'left', 'right', 'up', 'down'
-> call cmd_focus_direction($direction)
direction = 'prev', 'next'
-> FOCUS_AUTO
'output'
-> FOCUS_OUTPUT
window_mode = 'tiling', 'floating', 'mode_toggle'
@ -155,6 +157,12 @@ state FOCUS:
end
-> call cmd_focus()
state FOCUS_AUTO:
'sibling'
-> call cmd_focus_sibling($direction)
end
-> call cmd_focus_direction($direction)
state FOCUS_OUTPUT:
output = string
-> call cmd_focus_output($output)