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, const char *ctype, const 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, const 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 [--no-auto-back-and-forth] [window|container] [to] workspace <name>'.
55 void cmd_move_con_to_workspace_name(I3_CMD, const char *name, const char *no_auto_back_and_forth);
58 * Implementation of 'move [--no-auto-back-and-forth] [window|container] [to] workspace number <number>'.
61 void cmd_move_con_to_workspace_number(I3_CMD, const char *which, const char *no_auto_back_and_forth);
64 * Implementation of 'resize set <px> [px] <px> [px]'.
67 void cmd_resize_set(I3_CMD, long cwidth, long cheight);
70 * Implementation of 'resize grow|shrink <direction> [<px> px] [or <ppt> ppt]'.
73 void cmd_resize(I3_CMD, const char *way, const char *direction, long resize_px, long resize_ppt);
76 * Implementation of 'border normal|pixel [<n>]', 'border none|1pixel|toggle'.
79 void cmd_border(I3_CMD, const char *border_style_str, long border_width);
82 * Implementation of 'nop <comment>'.
85 void cmd_nop(I3_CMD, const char *comment);
88 * Implementation of 'append_layout <path>'.
91 void cmd_append_layout(I3_CMD, const char *path);
94 * Implementation of 'workspace next|prev|next_on_output|prev_on_output'.
97 void cmd_workspace(I3_CMD, const char *which);
100 * Implementation of 'workspace [--no-auto-back-and-forth] number <number>'
103 void cmd_workspace_number(I3_CMD, const char *which, const char *no_auto_back_and_forth);
106 * Implementation of 'workspace back_and_forth'.
109 void cmd_workspace_back_and_forth(I3_CMD);
112 * Implementation of 'workspace [--no-auto-back-and-forth] <name>'
115 void cmd_workspace_name(I3_CMD, const char *name, const char *no_auto_back_and_forth);
118 * Implementation of 'mark [--add|--replace] [--toggle] <mark>'
121 void cmd_mark(I3_CMD, const char *mark, const char *mode, const char *toggle);
124 * Implementation of 'unmark [mark]'
127 void cmd_unmark(I3_CMD, const char *mark);
130 * Implementation of 'mode <string>'.
133 void cmd_mode(I3_CMD, const char *mode);
136 * Implementation of 'move [window|container] [to] output <str>'.
139 void cmd_move_con_to_output(I3_CMD, const char *name);
142 * Implementation of 'move [window|container] [to] mark <str>'.
145 void cmd_move_con_to_mark(I3_CMD, const char *mark);
148 * Implementation of 'floating enable|disable|toggle'
151 void cmd_floating(I3_CMD, const char *floating_mode);
154 * Implementation of 'move workspace to [output] <str>'.
157 void cmd_move_workspace_to_output(I3_CMD, const char *name);
160 * Implementation of 'split v|h|t|vertical|horizontal|toggle'.
163 void cmd_split(I3_CMD, const char *direction);
166 * Implementation of 'kill [window|client]'.
169 void cmd_kill(I3_CMD, const char *kill_mode_str);
172 * Implementation of 'exec [--no-startup-id] <command>'.
175 void cmd_exec(I3_CMD, const char *nosn, const char *command);
178 * Implementation of 'focus left|right|up|down'.
181 void cmd_focus_direction(I3_CMD, const char *direction);
184 * Implementation of 'focus tiling|floating|mode_toggle'.
187 void cmd_focus_window_mode(I3_CMD, const char *window_mode);
190 * Implementation of 'focus parent|child'.
193 void cmd_focus_level(I3_CMD, const char *level);
196 * Implementation of 'focus'.
199 void cmd_focus(I3_CMD);
202 * Implementation of 'fullscreen [enable|disable|toggle] [global]'.
205 void cmd_fullscreen(I3_CMD, const char *action, const char *fullscreen_mode);
208 * Implementation of 'sticky enable|disable|toggle'.
211 void cmd_sticky(I3_CMD, const char *action);
214 * Implementation of 'move <direction> [<pixels> [px]]'.
217 void cmd_move_direction(I3_CMD, const char *direction, long move_px);
220 * Implementation of 'layout default|stacked|stacking|tabbed|splitv|splith'.
223 void cmd_layout(I3_CMD, const char *layout_str);
226 * Implementation of 'layout toggle [all|split]'.
229 void cmd_layout_toggle(I3_CMD, const char *toggle_mode);
232 * Implementation of 'exit'.
235 void cmd_exit(I3_CMD);
238 * Implementation of 'reload'.
241 void cmd_reload(I3_CMD);
244 * Implementation of 'restart'.
247 void cmd_restart(I3_CMD);
250 * Implementation of 'open'.
253 void cmd_open(I3_CMD);
256 * Implementation of 'focus output <output>'.
259 void cmd_focus_output(I3_CMD, const char *name);
262 * Implementation of 'move [window|container] [to] [absolute] position <px> [px] <px> [px]
265 void cmd_move_window_to_position(I3_CMD, const char *method, long x, long y);
268 * Implementation of 'move [window|container] [to] [absolute] position center
271 void cmd_move_window_to_center(I3_CMD, const char *method);
274 * Implementation of 'move [window|container] [to] position mouse'
277 void cmd_move_window_to_mouse(I3_CMD);
280 * Implementation of 'move scratchpad'.
283 void cmd_move_scratchpad(I3_CMD);
286 * Implementation of 'scratchpad show'.
289 void cmd_scratchpad_show(I3_CMD);
292 * Implementation of 'title_format <format>'
295 void cmd_title_format(I3_CMD, const char *format);
298 * Implementation of 'rename workspace <name> to <name>'
301 void cmd_rename_workspace(I3_CMD, const char *old_name, const char *new_name);
304 * Implementation of 'bar (hidden_state hide|show|toggle)|(mode dock|hide|invisible|toggle) [<bar_id>]'
307 void cmd_bar(I3_CMD, const char *bar_type, const char *bar_value, const char *bar_id);
310 * Implementation of 'shmlog <size>|toggle|on|off'
313 void cmd_shmlog(I3_CMD, const char *argument);
316 * Implementation of 'debuglog toggle|on|off'
319 void cmd_debuglog(I3_CMD, const char *argument);