]> git.sur5r.net Git - i3/i3/blobdiff - parser-specs/commands.spec
Merge pull request #1693 from mh21/wm-class-garbage-no-copy
[i3/i3] / parser-specs / commands.spec
index 4407158cb6398c49fb358f48158c484190a80c64..1cd8d2f6789686dda558edb5f102e4ff3140bffd 100644 (file)
@@ -1,7 +1,7 @@
 # vim:ts=2:sw=2:expandtab
 #
 # i3 - an improved dynamic tiling window manager
-# © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE)
+# © 2009 Michael Stapelberg and contributors (see also: LICENSE)
 #
 # parser-specs/commands.spec: Specification file for generate-command-parser.pl
 # which will generate the appropriate header files for our C parser.
@@ -20,6 +20,7 @@ state INITIAL:
   'restart' -> call cmd_restart()
   'reload' -> call cmd_reload()
   'shmlog' -> SHMLOG
+  'debuglog' -> DEBUGLOG
   'border' -> BORDER
   'layout' -> LAYOUT
   'append_layout' -> APPEND_LAYOUT
@@ -31,6 +32,7 @@ state INITIAL:
   'split' -> SPLIT
   'floating' -> FLOATING
   'mark' -> MARK
+  'unmark' -> UNMARK
   'resize' -> RESIZE
   'rename' -> RENAME
   'nop' -> NOP
@@ -39,14 +41,15 @@ state INITIAL:
   'bar' -> BAR
 
 state CRITERIA:
-  ctype = 'class' -> CRITERION
-  ctype = 'instance' -> CRITERION
+  ctype = 'class'       -> CRITERION
+  ctype = 'instance'    -> CRITERION
   ctype = 'window_role' -> CRITERION
-  ctype = 'con_id' -> CRITERION
-  ctype = 'id' -> CRITERION
-  ctype = 'con_mark' -> CRITERION
-  ctype = 'title' -> CRITERION
-  ctype = 'urgent' -> CRITERION
+  ctype = 'con_id'      -> CRITERION
+  ctype = 'id'          -> CRITERION
+  ctype = 'window_type' -> CRITERION
+  ctype = 'con_mark'    -> CRITERION
+  ctype = 'title'       -> CRITERION
+  ctype = 'urgent'      -> CRITERION
   ']' -> call cmd_criteria_match_windows(); INITIAL
 
 state CRITERION:
@@ -69,6 +72,11 @@ state SHMLOG:
   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', 'pixel'
@@ -149,12 +157,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:
@@ -166,10 +190,19 @@ state FLOATING:
   floating = 'enable', 'disable', 'toggle'
       -> call cmd_floating($floating)
 
-# mark <mark>
+# mark [--toggle] <mark>
 state MARK:
+  toggle = '--toggle'
+      ->
+  mark = string
+      -> call cmd_mark($mark, $toggle)
+
+# unmark [mark]
+state UNMARK:
+  end
+      -> call cmd_unmark($mark)
   mark = string
-      -> call cmd_mark($mark)
+      -> call cmd_unmark($mark)
 
 # resize
 state RESIZE:
@@ -195,11 +228,11 @@ 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>
@@ -233,6 +266,7 @@ state RENAME_WORKSPACE_NEW_NAME:
 # move <direction> [<pixels> [px]]
 # 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] mark <str>
 # move [window|container] [to] scratchpad
 # move workspace to [output] <str>
 # move scratchpad
@@ -248,6 +282,8 @@ state MOVE:
       -> MOVE_WORKSPACE
   'output'
       -> MOVE_TO_OUTPUT
+  'mark'
+      -> MOVE_TO_MARK
   'scratchpad'
       -> call cmd_move_scratchpad()
   direction = 'left', 'right', 'up', 'down'
@@ -289,6 +325,10 @@ state MOVE_TO_OUTPUT:
   output = string
       -> call cmd_move_con_to_output($output)
 
+state MOVE_TO_MARK:
+  mark = string
+      -> call cmd_move_con_to_mark($mark)
+
 state MOVE_WORKSPACE_TO_OUTPUT:
   'output'
       ->
@@ -323,6 +363,8 @@ state MODE:
 state NOP:
   comment = string
       -> call cmd_nop($comment)
+  end
+      -> call cmd_nop(NULL)
 
 state SCRATCHPAD:
   'show'