]> git.sur5r.net Git - i3/i3/blobdiff - parser-specs/commands.spec
Merge pull request #2992 from orestisf1993/next
[i3/i3] / parser-specs / commands.spec
index ec7fbabf9907474451980bfd1e5ef14417b4c506..a587332817e8b23bde3d48cd8ef434c43924b275 100644 (file)
@@ -38,6 +38,7 @@ state INITIAL:
   'rename' -> RENAME
   'nop' -> NOP
   'scratchpad' -> SCRATCHPAD
+  'swap' -> SWAP
   'title_format' -> TITLE_FORMAT
   'mode' -> MODE
   'bar' -> BAR
@@ -53,6 +54,8 @@ state CRITERIA:
   ctype = 'title'       -> CRITERION
   ctype = 'urgent'      -> CRITERION
   ctype = 'workspace'   -> CRITERION
+  ctype = 'tiling', 'floating'
+      -> call cmd_criteria_add($ctype, NULL); CRITERIA
   ']' -> call cmd_criteria_match_windows(); INITIAL
 
 state CRITERION:
@@ -108,7 +111,7 @@ state LAYOUT:
 state LAYOUT_TOGGLE:
   end
       -> call cmd_layout_toggle($toggle_mode)
-  toggle_mode = 'split', 'all'
+  toggle_mode = string
       -> call cmd_layout_toggle($toggle_mode)
 
 # append_layout <path>
@@ -271,24 +274,28 @@ state RENAME:
       -> RENAME_WORKSPACE
 
 state RENAME_WORKSPACE:
-  old_name = 'to'
+  'to'
       -> RENAME_WORKSPACE_LIKELY_TO
   old_name = word
       -> RENAME_WORKSPACE_TO
 
 state RENAME_WORKSPACE_LIKELY_TO:
-  'to'
-      -> RENAME_WORKSPACE_NEW_NAME
+  'to '
+      -> RENAME_WORKSPACE_LIKELY_TO_NEW_NAME
   new_name = word
       -> call cmd_rename_workspace(NULL, $new_name)
 
+state RENAME_WORKSPACE_LIKELY_TO_NEW_NAME:
+  new_name = string
+      -> call cmd_rename_workspace("to", $new_name)
+  end
+      -> call cmd_rename_workspace(NULL, "to")
+
 state RENAME_WORKSPACE_TO:
   'to'
-      -> RENAME_WORKSPACE_NEW_NAME
+      -> RENAME_WORKSPACE_TO_NEW_NAME
 
-state RENAME_WORKSPACE_NEW_NAME:
-  end
-      -> call cmd_rename_workspace(NULL, "to")
+state RENAME_WORKSPACE_TO_NEW_NAME:
   new_name = string
       -> call cmd_rename_workspace($old_name, $new_name)
 
@@ -404,6 +411,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)