Implement 'swap' command.

This patch introduces a new command 'swap' that swaps two containers so
that they assume each other's position and geometry.

fixes #917
This commit is contained in:
Ingo Bürk
2016-02-26 22:39:44 +01:00
parent 9bc504ebdb
commit 5f9a5e8d7d
13 changed files with 794 additions and 46 deletions

View File

@ -38,6 +38,7 @@ state INITIAL:
'rename' -> RENAME
'nop' -> NOP
'scratchpad' -> SCRATCHPAD
'swap' -> SWAP
'title_format' -> TITLE_FORMAT
'mode' -> MODE
'bar' -> BAR
@ -406,6 +407,21 @@ state SCRATCHPAD:
'show'
-> call cmd_scratchpad_show()
# swap [container] [with] id <window>
# swap [container] [with] con_id <con_id>
# swap [container] [with] mark <mark>
state SWAP:
'container'
->
'with'
->
mode = 'id', 'con_id', 'mark'
-> SWAP_ARGUMENT
state SWAP_ARGUMENT:
arg = string
-> call cmd_swap($mode, $arg)
state TITLE_FORMAT:
format = string
-> call cmd_title_format($format)