2 * vim:ts=4:sw=4:expandtab
4 * i3 - an improved dynamic tiling window manager
5 * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
7 * commands.c: all command functions (see commands_parser.c)
12 #include "commands_parser.h"
14 /** The beginning of the prototype for every cmd_ function. */
15 #define I3_CMD Match *current_match, struct CommandResultIR *cmd_output
18 * Initializes the specified 'Match' data structure and the initial state of
19 * commands.c for matching target windows of a command.
22 void cmd_criteria_init(I3_CMD);
25 * A match specification just finished (the closing square bracket was found),
26 * so we filter the list of owindows.
29 void cmd_criteria_match_windows(I3_CMD);
32 * Interprets a ctype=cvalue pair and adds it to the current match
36 void cmd_criteria_add(I3_CMD, char *ctype, char *cvalue);
39 * Implementation of 'move [window|container] [to] workspace
40 * next|prev|next_on_output|prev_on_output'.
43 void cmd_move_con_to_workspace(I3_CMD, char *which);
46 * Implementation of 'move [window|container] [to] workspace back_and_forth'.
49 void cmd_move_con_to_workspace_back_and_forth(I3_CMD);
52 * Implementation of 'move [window|container] [to] workspace <name>'.
55 void cmd_move_con_to_workspace_name(I3_CMD, char *name);
58 * Implementation of 'move [window|container] [to] workspace number <number>'.
61 void cmd_move_con_to_workspace_number(I3_CMD, char *which);
64 * Implementation of 'resize grow|shrink <direction> [<px> px] [or <ppt> ppt]'.
67 void cmd_resize(I3_CMD, char *way, char *direction, char *resize_px, char *resize_ppt);
70 * Implementation of 'border normal|none|1pixel|toggle'.
73 void cmd_border(I3_CMD, char *border_style_str, char *border_width);
76 * Implementation of 'nop <comment>'.
79 void cmd_nop(I3_CMD, char *comment);
82 * Implementation of 'append_layout <path>'.
85 void cmd_append_layout(I3_CMD, char *path);
88 * Implementation of 'workspace next|prev|next_on_output|prev_on_output'.
91 void cmd_workspace(I3_CMD, char *which);
94 * Implementation of 'workspace number <number>'
97 void cmd_workspace_number(I3_CMD, char *which);
100 * Implementation of 'workspace back_and_forth'.
103 void cmd_workspace_back_and_forth(I3_CMD);
106 * Implementation of 'workspace <name>'
109 void cmd_workspace_name(I3_CMD, char *name);
112 * Implementation of 'mark [--toggle] <mark>'
115 void cmd_mark(I3_CMD, char *mark, char *toggle);
118 * Implementation of 'unmark [mark]'
121 void cmd_unmark(I3_CMD, char *mark);
124 * Implementation of 'mode <string>'.
127 void cmd_mode(I3_CMD, char *mode);
130 * Implementation of 'move [window|container] [to] output <str>'.
133 void cmd_move_con_to_output(I3_CMD, char *name);
136 * Implementation of 'move [window|container] [to] mark <str>'.
139 void cmd_move_con_to_mark(I3_CMD, char *mark);
142 * Implementation of 'floating enable|disable|toggle'
145 void cmd_floating(I3_CMD, char *floating_mode);
148 * Implementation of 'move workspace to [output] <str>'.
151 void cmd_move_workspace_to_output(I3_CMD, char *name);
154 * Implementation of 'split v|h|vertical|horizontal'.
157 void cmd_split(I3_CMD, char *direction);
160 * Implementation of 'kill [window|client]'.
163 void cmd_kill(I3_CMD, char *kill_mode_str);
166 * Implementation of 'exec [--no-startup-id] <command>'.
169 void cmd_exec(I3_CMD, char *nosn, char *command);
172 * Implementation of 'focus left|right|up|down'.
175 void cmd_focus_direction(I3_CMD, char *direction);
178 * Implementation of 'focus tiling|floating|mode_toggle'.
181 void cmd_focus_window_mode(I3_CMD, char *window_mode);
184 * Implementation of 'focus parent|child'.
187 void cmd_focus_level(I3_CMD, char *level);
190 * Implementation of 'focus'.
193 void cmd_focus(I3_CMD);
196 * Implementation of 'fullscreen [enable|disable|toggle] [global]'.
199 void cmd_fullscreen(I3_CMD, char *action, char *fullscreen_mode);
202 * Implementation of 'move <direction> [<pixels> [px]]'.
205 void cmd_move_direction(I3_CMD, char *direction, char *move_px);
208 * Implementation of 'layout default|stacked|stacking|tabbed|splitv|splith'.
211 void cmd_layout(I3_CMD, char *layout_str);
214 * Implementation of 'layout toggle [all|split]'.
217 void cmd_layout_toggle(I3_CMD, char *toggle_mode);
220 * Implementation of 'exit'.
223 void cmd_exit(I3_CMD);
226 * Implementation of 'reload'.
229 void cmd_reload(I3_CMD);
232 * Implementation of 'restart'.
235 void cmd_restart(I3_CMD);
238 * Implementation of 'open'.
241 void cmd_open(I3_CMD);
244 * Implementation of 'focus output <output>'.
247 void cmd_focus_output(I3_CMD, char *name);
250 * Implementation of 'move [window|container] [to] [absolute] position <px> [px] <px> [px]
253 void cmd_move_window_to_position(I3_CMD, char *method, char *x, char *y);
256 * Implementation of 'move [window|container] [to] [absolute] position center
259 void cmd_move_window_to_center(I3_CMD, char *method);
262 * Implementation of 'move [window|container] [to] position mouse'
265 void cmd_move_window_to_mouse(I3_CMD);
268 * Implementation of 'move scratchpad'.
271 void cmd_move_scratchpad(I3_CMD);
274 * Implementation of 'scratchpad show'.
277 void cmd_scratchpad_show(I3_CMD);
280 * Implementation of 'rename workspace <name> to <name>'
283 void cmd_rename_workspace(I3_CMD, char *old_name, char *new_name);
286 * Implementation of 'bar (hidden_state hide|show|toggle)|(mode dock|hide|invisible|toggle) [<bar_id>]'
289 void cmd_bar(I3_CMD, char *bar_type, char *bar_value, char *bar_id);
292 * Implementation of 'shmlog <size>|toggle|on|off'
295 void cmd_shmlog(I3_CMD, char *argument);
298 * Implementation of 'debuglog toggle|on|off'
301 void cmd_debuglog(I3_CMD, char *argument);