]> git.sur5r.net Git - i3/i3/blobdiff - parser-specs/commands.spec
Merge pull request #1580 from Airblader/feature-nop
[i3/i3] / parser-specs / commands.spec
index b416d9680dfbfb2a48b248975fa376d17be6f752..315a9218dd5930695e540506ce11e0cd30cabbf4 100644 (file)
@@ -19,6 +19,8 @@ state INITIAL:
   'exit' -> call cmd_exit()
   'restart' -> call cmd_restart()
   'reload' -> call cmd_reload()
+  'shmlog' -> SHMLOG
+  'debuglog' -> DEBUGLOG
   'border' -> BORDER
   'layout' -> LAYOUT
   'append_layout' -> APPEND_LAYOUT
@@ -30,11 +32,13 @@ state INITIAL:
   'split' -> SPLIT
   'floating' -> FLOATING
   'mark' -> MARK
+  'unmark' -> UNMARK
   'resize' -> RESIZE
   'rename' -> RENAME
   'nop' -> NOP
   'scratchpad' -> SCRATCHPAD
   'mode' -> MODE
+  'bar' -> BAR
 
 state CRITERIA:
   ctype = 'class' -> CRITERION
@@ -61,15 +65,46 @@ state EXEC:
   command = string
       -> call cmd_exec($nosn, $command)
 
-# border normal|none|1pixel|toggle
+# shmlog <size>|toggle|on|off
+state SHMLOG:
+  # argument may be a number
+  argument = string
+    -> call cmd_shmlog($argument)
+
+# debuglog toggle|on|off
+state DEBUGLOG:
+  argument = 'toggle', 'on', 'off'
+    -> call cmd_debuglog($argument)
+
+# border normal|none|1pixel|toggle|1pixel
 state BORDER:
-  border_style = 'normal', 'none', '1pixel', 'toggle'
-      -> call cmd_border($border_style)
+  border_style = 'normal', 'pixel'
+    -> BORDER_WIDTH
+  border_style = 'none', 'toggle'
+    -> call cmd_border($border_style, "0")
+  border_style = '1pixel'
+    -> call cmd_border($border_style, "1")
+
+state BORDER_WIDTH:
+  end
+    -> call cmd_border($border_style, "2")
+  border_width = word
+    -> call cmd_border($border_style, $border_width)
 
-# layout default|stacked|stacking|tabbed
+# layout default|stacked|stacking|tabbed|splitv|splith
+# layout toggle [split|all]
 state LAYOUT:
-  layout_mode = 'default', 'stacked', 'stacking', 'tabbed'
+  layout_mode = 'default', 'stacked', 'stacking', 'tabbed', 'splitv', 'splith'
       -> call cmd_layout($layout_mode)
+  'toggle'
+      -> LAYOUT_TOGGLE
+
+# layout toggle [split|all]
+state LAYOUT_TOGGLE:
+  end
+      -> call cmd_layout_toggle($toggle_mode)
+  toggle_mode = 'split', 'all'
+      -> call cmd_layout_toggle($toggle_mode)
 
 # append_layout <path>
 state APPEND_LAYOUT:
@@ -121,12 +156,28 @@ state KILL:
   end
       -> call cmd_kill($kill_mode)
 
+# fullscreen enable|toggle [global]
+# fullscreen disable
 # fullscreen [global]
 state FULLSCREEN:
-  fullscreen_mode = 'global'
-      -> call cmd_fullscreen($fullscreen_mode)
+  action = 'disable'
+      -> call cmd_fullscreen($action, "output")
+  action = 'enable', 'toggle'
+      -> FULLSCREEN_MODE
+  action = ''
+      -> FULLSCREEN_COMPAT
+
+state FULLSCREEN_MODE:
+  mode = 'global'
+      -> call cmd_fullscreen($action, $mode)
+  end
+      -> call cmd_fullscreen($action, "output")
+
+state FULLSCREEN_COMPAT:
+  mode = 'global'
+      -> call cmd_fullscreen("toggle", $mode)
   end
-      -> call cmd_fullscreen($fullscreen_mode)
+      -> call cmd_fullscreen("toggle", "output")
 
 # split v|h|vertical|horizontal
 state SPLIT:
@@ -143,6 +194,13 @@ state MARK:
   mark = string
       -> call cmd_mark($mark)
 
+# unmark [mark]
+state UNMARK:
+  end
+      -> call cmd_unmark($mark)
+  mark = string
+      -> call cmd_unmark($mark)
+
 # resize
 state RESIZE:
   way = 'grow', 'shrink'
@@ -167,30 +225,43 @@ state RESIZE_TILING:
       -> call cmd_resize($way, $direction, $resize_px, "10")
 
 state RESIZE_TILING_OR:
-  'ppt'
-      ->
   resize_ppt = word
-      ->
-  end
+      -> RESIZE_TILING_FINAL
+
+state RESIZE_TILING_FINAL:
+  'ppt', end
       -> call cmd_resize($way, $direction, $resize_px, $resize_ppt)
 
 # rename workspace <name> to <name>
+# rename workspace to <name>
 state RENAME:
   'workspace'
       -> RENAME_WORKSPACE
 
 state RENAME_WORKSPACE:
+  old_name = 'to'
+      -> RENAME_WORKSPACE_LIKELY_TO
   old_name = word
       -> RENAME_WORKSPACE_TO
 
+state RENAME_WORKSPACE_LIKELY_TO:
+  'to'
+      -> RENAME_WORKSPACE_NEW_NAME
+  new_name = word
+      -> call cmd_rename_workspace(NULL, $new_name)
+
 state RENAME_WORKSPACE_TO:
   'to'
-      ->
+      -> RENAME_WORKSPACE_NEW_NAME
+
+state RENAME_WORKSPACE_NEW_NAME:
+  end
+      -> call cmd_rename_workspace(NULL, "to")
   new_name = string
       -> call cmd_rename_workspace($old_name, $new_name)
 
 # move <direction> [<pixels> [px]]
-# move [window|container] [to] workspace [<str>|next|prev|current]
+# move [window|container] [to] workspace [<str>|next|prev|next_on_output|prev_on_output|current]
 # move [window|container] [to] output <str>
 # move [window|container] [to] scratchpad
 # move workspace to [output] <str>
@@ -229,10 +300,12 @@ state MOVE_DIRECTION_PX:
       -> call cmd_move_direction($direction, $pixels)
 
 state MOVE_WORKSPACE:
-  'to'
+  'to '
       -> MOVE_WORKSPACE_TO_OUTPUT
-  workspace = 'next', 'prev', 'next_on_output', 'prev_on_output', 'current'
+  workspace = 'next_on_output', 'prev_on_output', 'next', 'prev', 'current'
       -> call cmd_move_con_to_workspace($workspace)
+  'back_and_forth'
+      -> call cmd_move_con_to_workspace_back_and_forth()
   'number'
       -> MOVE_WORKSPACE_NUMBER
   workspace = string
@@ -280,7 +353,30 @@ state MODE:
 state NOP:
   comment = string
       -> call cmd_nop($comment)
+  end
+      -> call cmd_nop(NULL)
 
 state SCRATCHPAD:
   'show'
       -> call cmd_scratchpad_show()
+
+# bar (hidden_state hide|show|toggle)|(mode dock|hide|invisible|toggle) [<bar_id>]
+state BAR:
+  bar_type = 'hidden_state'
+      -> BAR_HIDDEN_STATE
+  bar_type = 'mode'
+      -> BAR_MODE
+
+state BAR_HIDDEN_STATE:
+  bar_value = 'hide', 'show', 'toggle'
+      -> BAR_W_ID
+
+state BAR_MODE:
+  bar_value = 'dock', 'hide', 'invisible', 'toggle'
+      -> BAR_W_ID
+
+state BAR_W_ID:
+  bar_id = word
+      ->
+  end
+      -> call cmd_bar($bar_type, $bar_value, $bar_id)