i3
commands.h
Go to the documentation of this file.
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
6  *
7  * commands.c: all command functions (see commands_parser.c)
8  *
9  */
10 #pragma once
11 
12 #include <config.h>
13 
14 #include "commands_parser.h"
15 
17 #define I3_CMD Match *current_match, struct CommandResultIR *cmd_output
18 
25 
32 
38 void cmd_criteria_add(I3_CMD, const char *ctype, const char *cvalue);
39 
45 void cmd_move_con_to_workspace(I3_CMD, const char *which);
46 
52 
57 void cmd_move_con_to_workspace_name(I3_CMD, const char *name, const char *no_auto_back_and_forth);
58 
63 void cmd_move_con_to_workspace_number(I3_CMD, const char *which, const char *no_auto_back_and_forth);
64 
69 void cmd_resize_set(I3_CMD, long cwidth, const char *mode_width, long cheight, const char *mode_height);
70 
75 void cmd_resize(I3_CMD, const char *way, const char *direction, long resize_px, long resize_ppt);
76 
81 void cmd_border(I3_CMD, const char *border_style_str, long border_width);
82 
87 void cmd_nop(I3_CMD, const char *comment);
88 
93 void cmd_append_layout(I3_CMD, const char *path);
94 
99 void cmd_workspace(I3_CMD, const char *which);
100 
105 void cmd_workspace_number(I3_CMD, const char *which, const char *no_auto_back_and_forth);
106 
112 
117 void cmd_workspace_name(I3_CMD, const char *name, const char *no_auto_back_and_forth);
118 
123 void cmd_mark(I3_CMD, const char *mark, const char *mode, const char *toggle);
124 
129 void cmd_unmark(I3_CMD, const char *mark);
130 
135 void cmd_mode(I3_CMD, const char *mode);
136 
141 void cmd_move_con_to_output(I3_CMD, const char *name, bool move_workspace);
142 
147 void cmd_move_con_to_mark(I3_CMD, const char *mark);
148 
153 void cmd_floating(I3_CMD, const char *floating_mode);
154 
159 void cmd_split(I3_CMD, const char *direction);
160 
165 void cmd_kill(I3_CMD, const char *kill_mode_str);
166 
171 void cmd_exec(I3_CMD, const char *nosn, const char *command);
172 
177 void cmd_focus_direction(I3_CMD, const char *direction);
178 
183 void cmd_focus_sibling(I3_CMD, const char *direction);
184 
189 void cmd_focus_window_mode(I3_CMD, const char *window_mode);
190 
195 void cmd_focus_level(I3_CMD, const char *level);
196 
201 void cmd_focus(I3_CMD);
202 
207 void cmd_fullscreen(I3_CMD, const char *action, const char *fullscreen_mode);
208 
213 void cmd_sticky(I3_CMD, const char *action);
214 
219 void cmd_move_direction(I3_CMD, const char *direction_str, long amount, const char *mode);
220 
225 void cmd_layout(I3_CMD, const char *layout_str);
226 
231 void cmd_layout_toggle(I3_CMD, const char *toggle_mode);
232 
237 void cmd_exit(I3_CMD);
238 
243 void cmd_reload(I3_CMD);
244 
249 void cmd_restart(I3_CMD);
250 
255 void cmd_open(I3_CMD);
256 
261 void cmd_focus_output(I3_CMD, const char *name);
262 
267 void cmd_move_window_to_position(I3_CMD, long x, const char *mode_x, long y, const char *mode_y);
268 
273 void cmd_move_window_to_center(I3_CMD, const char *method);
274 
280 
286 
292 
297 void cmd_swap(I3_CMD, const char *mode, const char *arg);
298 
303 void cmd_title_format(I3_CMD, const char *format);
304 
309 void cmd_rename_workspace(I3_CMD, const char *old_name, const char *new_name);
310 
315 void cmd_bar_mode(I3_CMD, const char *bar_mode, const char *bar_id);
316 
321 void cmd_bar_hidden_state(I3_CMD, const char *bar_hidden_state, const char *bar_id);
322 
327 void cmd_shmlog(I3_CMD, const char *argument);
328 
333 void cmd_debuglog(I3_CMD, const char *argument);
334 
339 void cmd_gaps(I3_CMD, const char *type, const char *scope, const char *mode, const char *value);
340 
345 void cmd_title_window_icon(I3_CMD, const char *enable, int padding);
void cmd_focus_sibling(I3_CMD, const char *direction)
Implementation of &#39;focus next|prev sibling&#39;.
Definition: commands.c:1346
void cmd_floating(I3_CMD, const char *floating_mode)
Implementation of &#39;floating enable|disable|toggle&#39;.
Definition: commands.c:1162
void cmd_split(I3_CMD, const char *direction)
Implementation of &#39;split v|h|t|vertical|horizontal|toggle&#39;.
Definition: commands.c:1193
void cmd_bar_mode(I3_CMD, const char *bar_mode, const char *bar_id)
Implementation of &#39;bar mode dock|hide|invisible|toggle [<bar_id>]&#39;.
Definition: commands.c:2203
void cmd_title_window_icon(I3_CMD, const char *enable, int padding)
Implementation of &#39;title_window_icon <yes|no|toggle>&#39; and &#39;title_window_icon <padding|toggle> <px>&#39;...
Definition: commands.c:2061
void cmd_debuglog(I3_CMD, const char *argument)
Implementation of &#39;debuglog toggle|on|off&#39;.
Definition: commands.c:2351
void cmd_fullscreen(I3_CMD, const char *action, const char *fullscreen_mode)
Implementation of &#39;fullscreen [enable|disable|toggle] [global]&#39;.
Definition: commands.c:1493
void cmd_move_window_to_position(I3_CMD, long x, const char *mode_x, long y, const char *mode_y)
Implementation of &#39;move [window|container] [to] [absolute] position [<pos_x> [px|ppt] <pos_y> [px|ppt...
Definition: commands.c:1810
void cmd_move_window_to_mouse(I3_CMD)
Implementation of &#39;move [window|container] [to] position mouse&#39;.
Definition: commands.c:1893
void cmd_exit(I3_CMD)
Implementation of &#39;exit&#39;.
Definition: commands.c:1668
void cmd_focus_output(I3_CMD, const char *name)
Implementation of &#39;focus output <output>&#39;.
Definition: commands.c:1761
void cmd_move_con_to_workspace_number(I3_CMD, const char *which, const char *no_auto_back_and_forth)
Implementation of &#39;move [–no-auto-back-and-forth] [window|container] [to] workspace number <number>&#39;...
Definition: commands.c:377
#define y(x,...)
Definition: commands.c:18
void cmd_focus_level(I3_CMD, const char *level)
Implementation of &#39;focus parent|child&#39;.
Definition: commands.c:1418
void cmd_shmlog(I3_CMD, const char *argument)
Implementation of &#39;shmlog <size>|toggle|on|off&#39;.
Definition: commands.c:2319
void cmd_gaps(I3_CMD, const char *type, const char *scope, const char *mode, const char *value)
Implementation of &#39;gaps inner|outer|top|right|bottom|left|horizontal|vertical current|all set|plus|mi...
Definition: commands.c:2473
void cmd_swap(I3_CMD, const char *mode, const char *arg)
Implementation of &#39;swap [container] [with] id|con_id|mark <arg>&#39;.
Definition: commands.c:1960
void cmd_move_con_to_output(I3_CMD, const char *name, bool move_workspace)
Implementation of &#39;move [window|container] [to] output <str>&#39;.
Definition: commands.c:1091
void cmd_restart(I3_CMD)
Implementation of &#39;restart&#39;.
Definition: commands.c:1709
void cmd_move_scratchpad(I3_CMD)
Implementation of &#39;move scratchpad&#39;.
Definition: commands.c:1917
void cmd_mark(I3_CMD, const char *mark, const char *mode, const char *toggle)
Implementation of &#39;mark [–add|–replace] [–toggle] <mark>&#39;.
Definition: commands.c:952
void cmd_move_window_to_center(I3_CMD, const char *method)
Implementation of &#39;move [window|container] [to] [absolute] position center.
Definition: commands.c:1849
void cmd_resize_set(I3_CMD, long cwidth, const char *mode_width, long cheight, const char *mode_height)
Implementation of &#39;resize set <width> [px | ppt] <height> [px | ppt]&#39;.
Definition: commands.c:654
void cmd_criteria_init(I3_CMD)
Initializes the specified &#39;Match&#39; data structure and the initial state of commands.c for matching target windows of a command.
void cmd_move_con_to_mark(I3_CMD, const char *mark)
Implementation of &#39;move [window|container] [to] mark <str>&#39;.
Definition: commands.c:1142
void cmd_rename_workspace(I3_CMD, const char *old_name, const char *new_name)
Implementation of &#39;rename workspace <name> to <name>&#39;.
Definition: commands.c:2110
void cmd_move_con_to_workspace(I3_CMD, const char *which)
Implementation of &#39;move [window|container] [to] workspace next|prev|next_on_output|prev_on_output&#39;.
Definition: commands.c:297
void cmd_reload(I3_CMD)
Implementation of &#39;reload&#39;.
Definition: commands.c:1679
void cmd_kill(I3_CMD, const char *kill_mode_str)
Implementation of &#39;kill [window|client]&#39;.
Definition: commands.c:1232
void cmd_move_direction(I3_CMD, const char *direction_str, long amount, const char *mode)
Implementation of &#39;move <direction> [<amount> [px|ppt]]&#39;.
Definition: commands.c:1558
void cmd_move_con_to_workspace_name(I3_CMD, const char *name, const char *no_auto_back_and_forth)
Implementation of &#39;move [–no-auto-back-and-forth] [window|container] [to] workspace <name>&#39;...
Definition: commands.c:350
void cmd_workspace(I3_CMD, const char *which)
Implementation of &#39;workspace next|prev|next_on_output|prev_on_output&#39;.
Definition: commands.c:835
void cmd_focus_direction(I3_CMD, const char *direction)
Implementation of &#39;focus left|right|up|down&#39;.
Definition: commands.c:1308
void cmd_criteria_match_windows(I3_CMD)
A match specification just finished (the closing square bracket was found), so we filter the list of ...
Definition: commands.c:170
void cmd_criteria_add(I3_CMD, const char *ctype, const char *cvalue)
Interprets a ctype=cvalue pair and adds it to the current match specification.
Definition: commands.c:253
void cmd_exec(I3_CMD, const char *nosn, const char *command)
Implementation of &#39;exec [–no-startup-id] <command>&#39;.
Definition: commands.c:1264
void cmd_mode(I3_CMD, const char *mode)
Implementation of &#39;mode <string>&#39;.
Definition: commands.c:1004
void cmd_focus_window_mode(I3_CMD, const char *window_mode)
Implementation of &#39;focus tiling|floating|mode_toggle&#39;.
Definition: commands.c:1381
void cmd_layout_toggle(I3_CMD, const char *toggle_mode)
Implementation of &#39;layout toggle [all|split]&#39;.
Definition: commands.c:1641
void cmd_workspace_back_and_forth(I3_CMD)
Implementation of &#39;workspace back_and_forth&#39;.
Definition: commands.c:906
void cmd_layout(I3_CMD, const char *layout_str)
Implementation of &#39;layout default|stacked|stacking|tabbed|splitv|splith&#39;.
Definition: commands.c:1610
void cmd_border(I3_CMD, const char *border_style_str, long border_width)
Implementation of &#39;border normal|pixel [<n>]&#39;, &#39;border none|1pixel|toggle&#39;.
Definition: commands.c:711
void cmd_focus(I3_CMD)
Implementation of &#39;focus&#39;.
Definition: commands.c:1446
void cmd_unmark(I3_CMD, const char *mark)
Implementation of &#39;unmark [mark]&#39;.
Definition: commands.c:985
#define I3_CMD
The beginning of the prototype for every cmd_ function.
Definition: commands.h:17
void cmd_sticky(I3_CMD, const char *action)
Implementation of &#39;sticky enable|disable|toggle&#39;.
Definition: commands.c:1520
void cmd_title_format(I3_CMD, const char *format)
Implementation of &#39;title_format <format>&#39;.
Definition: commands.c:2018
void cmd_scratchpad_show(I3_CMD)
Implementation of &#39;scratchpad show&#39;.
Definition: commands.c:1937
void cmd_workspace_name(I3_CMD, const char *name, const char *no_auto_back_and_forth)
Implementation of &#39;workspace [–no-auto-back-and-forth] <name>&#39;.
Definition: commands.c:923
void cmd_nop(I3_CMD, const char *comment)
Implementation of &#39;nop <comment>&#39;.
Definition: commands.c:748
void cmd_open(I3_CMD)
Implementation of &#39;open&#39;.
Definition: commands.c:1741
void cmd_move_con_to_workspace_back_and_forth(I3_CMD)
Implementation of &#39;move [window|container] [to] workspace back_and_forth&#39;.
Definition: commands.c:330
void cmd_bar_hidden_state(I3_CMD, const char *bar_hidden_state, const char *bar_id)
Implementation of &#39;bar hidden_state hide|show|toggle [<bar_id>]&#39;.
Definition: commands.c:2262
void cmd_workspace_number(I3_CMD, const char *which, const char *no_auto_back_and_forth)
Implementation of &#39;workspace [–no-auto-back-and-forth] number <number>&#39;.
Definition: commands.c:869
void cmd_resize(I3_CMD, const char *way, const char *direction, long resize_px, long resize_ppt)
Implementation of &#39;resize grow|shrink <direction> [<px> px] [or <ppt> ppt]&#39;.
Definition: commands.c:575
void cmd_append_layout(I3_CMD, const char *path)
Implementation of &#39;append_layout <path>&#39;.
Definition: commands.c:759