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 ctype = 'urgent' -> CRITERION
47 ']' -> call cmd_criteria_match_windows(); INITIAL
54 -> call cmd_criteria_add($ctype, $cvalue); CRITERIA
56 # exec [--no-startup-id] <command>
58 nosn = '--no-startup-id'
61 -> call cmd_exec($nosn, $command)
63 # border normal|none|1pixel|toggle
65 border_style = 'normal', 'none', '1pixel', 'toggle'
66 -> call cmd_border($border_style)
68 # layout default|stacked|stacking|tabbed
70 layout_mode = 'default', 'stacked', 'stacking', 'tabbed'
71 -> call cmd_layout($layout_mode)
73 # append_layout <path>
75 path = string -> call cmd_append_layout($path)
77 # workspace next|prev|next_on_output|prev_on_output
78 # workspace back_and_forth
81 direction = 'next_on_output', 'prev_on_output', 'next', 'prev'
82 -> call cmd_workspace($direction)
84 -> call cmd_workspace_back_and_forth()
86 -> call cmd_workspace_name($workspace)
88 # focus left|right|up|down
89 # focus output <output>
90 # focus tiling|floating|mode_toggle
94 direction = 'left', 'right', 'up', 'down'
95 -> call cmd_focus_direction($direction)
98 window_mode = 'tiling', 'floating', 'mode_toggle'
99 -> call cmd_focus_window_mode($window_mode)
100 level = 'parent', 'child'
101 -> call cmd_focus_level($level)
107 -> call cmd_focus_output($output)
109 # kill [window|client]
111 kill_mode = 'window', 'client'
112 -> call cmd_kill($kill_mode)
114 -> call cmd_kill($kill_mode)
116 # fullscreen [global]
118 fullscreen_mode = 'global'
119 -> call cmd_fullscreen($fullscreen_mode)
121 -> call cmd_fullscreen($fullscreen_mode)
123 # split v|h|vertical|horizontal
125 direction = 'v', 'h', 'vertical', 'horizontal'
126 -> call cmd_split($direction)
128 # floating enable|disable|toggle
130 floating = 'enable', 'disable', 'toggle'
131 -> call cmd_floating($floating)
136 -> call cmd_mark($mark)
140 way = 'grow', 'shrink'
143 state RESIZE_DIRECTION:
144 direction = 'up', 'down', 'left', 'right'
151 -> call cmd_resize($way, $direction, "10", "10")
159 -> call cmd_resize($way, $direction, $resize_px, "10")
161 state RESIZE_TILING_OR:
167 -> call cmd_resize($way, $direction, $resize_px, $resize_ppt)
169 # move <direction> [<pixels> [px]]
170 # move [window|container] [to] workspace <str>
171 # move [window|container] [to] output <str>
172 # move [window|container] [to] scratchpad
173 # move workspace to [output] <str>
187 -> call cmd_move_scratchpad()
188 direction = 'left', 'right', 'up', 'down'
191 state MOVE_DIRECTION:
195 -> call cmd_move_direction($direction, "10")
197 state MOVE_DIRECTION_PX:
199 -> call cmd_move_direction($direction, $pixels)
201 -> call cmd_move_direction($direction, $pixels)
203 state MOVE_WORKSPACE:
205 -> MOVE_WORKSPACE_TO_OUTPUT
206 workspace = 'next', 'prev', 'next_on_output', 'prev_on_output'
207 -> call cmd_move_con_to_workspace($workspace)
209 -> call cmd_move_con_to_workspace_name($workspace)
211 state MOVE_TO_OUTPUT:
213 -> call cmd_move_con_to_output($output)
215 state MOVE_WORKSPACE_TO_OUTPUT:
219 -> call cmd_move_workspace_to_output($output)
224 -> call cmd_mode($mode)
228 -> call cmd_nop($comment)
232 -> call cmd_scratchpad_show()