1 # vim:ts=2:sw=2:expandtab
3 # i3 - an improved dynamic tiling window manager
4 # © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE)
6 # parser-specs/commands.spec: Specification file for generate-command-parser.pl
7 # which will generate the appropriate header files for our C parser.
9 # Use :source highlighting.vim in vim to get syntax highlighting
13 # We have an end token here for all the commands which just call some
14 # function without using an explicit 'end' token.
16 '[' -> call cmd_criteria_init(); CRITERIA
19 'exit' -> call cmd_exit()
20 'restart' -> call cmd_restart()
21 'reload' -> call cmd_reload()
24 'append_layout' -> APPEND_LAYOUT
25 'workspace' -> WORKSPACE
28 'open' -> call cmd_open()
29 'fullscreen' -> FULLSCREEN
31 'floating' -> FLOATING
35 'scratchpad' -> SCRATCHPAD
39 ctype = 'class' -> CRITERION
40 ctype = 'instance' -> CRITERION
41 ctype = 'window_role' -> CRITERION
42 ctype = 'con_id' -> CRITERION
43 ctype = 'id' -> CRITERION
44 ctype = 'con_mark' -> CRITERION
45 ctype = 'title' -> CRITERION
46 ']' -> call cmd_criteria_match_windows(); INITIAL
53 -> call cmd_criteria_add($ctype, $cvalue); CRITERIA
55 # exec [--no-startup-id] <command>
57 nosn = '--no-startup-id'
60 -> call cmd_exec($nosn, $command)
62 # border normal|none|1pixel|toggle
64 border_style = 'normal', 'none', '1pixel', 'toggle'
65 -> call cmd_border($border_style)
67 # layout default|stacked|stacking|tabbed
69 layout_mode = 'default', 'stacked', 'stacking', 'tabbed'
70 -> call cmd_layout($layout_mode)
72 # append_layout <path>
74 path = string -> call cmd_append_layout($path)
76 # workspace next|prev|next_on_output|prev_on_output
77 # workspace back_and_forth
80 direction = 'next_on_output', 'prev_on_output', 'next', 'prev'
81 -> call cmd_workspace($direction)
83 -> call cmd_workspace_back_and_forth()
85 -> call cmd_workspace_name($workspace)
87 # focus left|right|up|down
88 # focus output <output>
89 # focus tiling|floating|mode_toggle
93 direction = 'left', 'right', 'up', 'down'
94 -> call cmd_focus_direction($direction)
97 window_mode = 'tiling', 'floating', 'mode_toggle'
98 -> call cmd_focus_window_mode($window_mode)
99 level = 'parent', 'child'
100 -> call cmd_focus_level($level)
106 -> call cmd_focus_output($output)
108 # kill [window|client]
110 kill_mode = 'window', 'client'
111 -> call cmd_kill($kill_mode)
113 -> call cmd_kill($kill_mode)
115 # fullscreen [global]
117 fullscreen_mode = 'global'
118 -> call cmd_fullscreen($fullscreen_mode)
120 -> call cmd_fullscreen($fullscreen_mode)
122 # split v|h|vertical|horizontal
124 direction = 'v', 'h', 'vertical', 'horizontal'
125 -> call cmd_split($direction)
127 # floating enable|disable|toggle
129 floating = 'enable', 'disable', 'toggle'
130 -> call cmd_floating($floating)
135 -> call cmd_mark($mark)
139 way = 'grow', 'shrink'
142 state RESIZE_DIRECTION:
143 direction = 'up', 'down', 'left', 'right'
150 -> call cmd_resize($way, $direction, "10", "10")
158 -> call cmd_resize($way, $direction, $resize_px, "10")
160 state RESIZE_TILING_OR:
166 -> call cmd_resize($way, $direction, $resize_px, $resize_ppt)
168 # move <direction> [<pixels> [px]]
169 # move [window|container] [to] workspace <str>
170 # move [window|container] [to] output <str>
171 # move [window|container] [to] scratchpad
172 # move workspace to [output] <str>
186 -> call cmd_move_scratchpad()
187 direction = 'left', 'right', 'up', 'down'
190 state MOVE_DIRECTION:
194 -> call cmd_move_direction($direction, "10")
196 state MOVE_DIRECTION_PX:
198 -> call cmd_move_direction($direction, $pixels)
200 -> call cmd_move_direction($direction, $pixels)
202 state MOVE_WORKSPACE:
204 -> MOVE_WORKSPACE_TO_OUTPUT
205 workspace = 'next', 'prev', 'next_on_output', 'prev_on_output'
206 -> call cmd_move_con_to_workspace($workspace)
208 -> call cmd_move_con_to_workspace_name($workspace)
210 state MOVE_TO_OUTPUT:
212 -> call cmd_move_con_to_output($output)
214 state MOVE_WORKSPACE_TO_OUTPUT:
218 -> call cmd_move_workspace_to_output($output)
223 -> call cmd_mode($mode)
227 -> call cmd_nop($comment)
231 -> call cmd_scratchpad_show()