2 * vim:ts=4:sw=4:expandtab
4 * i3 - an improved dynamic tiling window manager
5 * © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE)
7 * commands.c: all command functions (see commands_parser.c)
13 #include "commands_parser.h"
15 /** The beginning of the prototype for every cmd_ function. */
16 #define I3_CMD Match *current_match, struct CommandResult *cmd_output
19 * Initializes the specified 'Match' data structure and the initial state of
20 * commands.c for matching target windows of a command.
23 void cmd_criteria_init(I3_CMD);
26 * A match specification just finished (the closing square bracket was found),
27 * so we filter the list of owindows.
30 void cmd_criteria_match_windows(I3_CMD);
33 * Interprets a ctype=cvalue pair and adds it to the current match
37 void cmd_criteria_add(I3_CMD, char *ctype, char *cvalue);
40 * Implementation of 'move [window|container] [to] workspace
41 * next|prev|next_on_output|prev_on_output'.
44 void cmd_move_con_to_workspace(I3_CMD, char *which);
47 * Implementation of 'move [window|container] [to] workspace back_and_forth'.
50 void cmd_move_con_to_workspace_back_and_forth(I3_CMD);
53 * Implementation of 'move [window|container] [to] workspace <name>'.
56 void cmd_move_con_to_workspace_name(I3_CMD, char *name);
59 * Implementation of 'move [window|container] [to] workspace number <number>'.
62 void cmd_move_con_to_workspace_number(I3_CMD, char *which);
65 * Implementation of 'resize grow|shrink <direction> [<px> px] [or <ppt> ppt]'.
68 void cmd_resize(I3_CMD, char *way, char *direction, char *resize_px, char *resize_ppt);
71 * Implementation of 'border normal|none|1pixel|toggle'.
74 void cmd_border(I3_CMD, char *border_style_str, char *border_width);
77 * Implementation of 'nop <comment>'.
80 void cmd_nop(I3_CMD, char *comment);
83 * Implementation of 'append_layout <path>'.
86 void cmd_append_layout(I3_CMD, char *path);
89 * Implementation of 'workspace next|prev|next_on_output|prev_on_output'.
92 void cmd_workspace(I3_CMD, char *which);
95 * Implementation of 'workspace number <number>'
98 void cmd_workspace_number(I3_CMD, char *which);
101 * Implementation of 'workspace back_and_forth'.
104 void cmd_workspace_back_and_forth(I3_CMD);
107 * Implementation of 'workspace <name>'
110 void cmd_workspace_name(I3_CMD, char *name);
113 * Implementation of 'mark <mark>'
116 void cmd_mark(I3_CMD, char *mark);
119 * Implementation of 'mode <string>'.
122 void cmd_mode(I3_CMD, char *mode);
125 * Implementation of 'move [window|container] [to] output <str>'.
128 void cmd_move_con_to_output(I3_CMD, char *name);
131 * Implementation of 'floating enable|disable|toggle'
134 void cmd_floating(I3_CMD, char *floating_mode);
137 * Implementation of 'move workspace to [output] <str>'.
140 void cmd_move_workspace_to_output(I3_CMD, char *name);
143 * Implementation of 'split v|h|vertical|horizontal'.
146 void cmd_split(I3_CMD, char *direction);
149 * Implementation of 'kill [window|client]'.
152 void cmd_kill(I3_CMD, char *kill_mode_str);
155 * Implementation of 'exec [--no-startup-id] <command>'.
158 void cmd_exec(I3_CMD, char *nosn, char *command);
161 * Implementation of 'focus left|right|up|down'.
164 void cmd_focus_direction(I3_CMD, char *direction);
167 * Implementation of 'focus tiling|floating|mode_toggle'.
170 void cmd_focus_window_mode(I3_CMD, char *window_mode);
173 * Implementation of 'focus parent|child'.
176 void cmd_focus_level(I3_CMD, char *level);
179 * Implementation of 'focus'.
182 void cmd_focus(I3_CMD);
185 * Implementation of 'fullscreen [global]'.
188 void cmd_fullscreen(I3_CMD, char *fullscreen_mode);
191 * Implementation of 'move <direction> [<pixels> [px]]'.
194 void cmd_move_direction(I3_CMD, char *direction, char *move_px);
197 * Implementation of 'layout default|stacked|stacking|tabbed|splitv|splith'.
200 void cmd_layout(I3_CMD, char *layout_str);
203 * Implementation of 'layout toggle [all|split]'.
206 void cmd_layout_toggle(I3_CMD, char *toggle_mode);
209 * Implementation of 'exit'.
212 void cmd_exit(I3_CMD);
215 * Implementation of 'reload'.
218 void cmd_reload(I3_CMD);
221 * Implementation of 'restart'.
224 void cmd_restart(I3_CMD);
227 * Implementation of 'open'.
230 void cmd_open(I3_CMD);
233 * Implementation of 'focus output <output>'.
236 void cmd_focus_output(I3_CMD, char *name);
239 * Implementation of 'move [window|container] [to] [absolute] position <px> [px] <px> [px]
242 void cmd_move_window_to_position(I3_CMD, char *method, char *x, char *y);
245 * Implementation of 'move [window|container] [to] [absolute] position center
248 void cmd_move_window_to_center(I3_CMD, char *method);
251 * Implementation of 'move scratchpad'.
254 void cmd_move_scratchpad(I3_CMD);
257 * Implementation of 'scratchpad show'.
260 void cmd_scratchpad_show(I3_CMD);
263 * Implementation of 'rename workspace <name> to <name>'
266 void cmd_rename_workspace(I3_CMD, char *old_name, char *new_name);