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-2012 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 "commands_parser.h"
13 
15 #define I3_CMD Match *current_match, struct CommandResultIR *cmd_output
16 
23 
30 
36 void cmd_criteria_add(I3_CMD, char *ctype, char *cvalue);
37 
43 void cmd_move_con_to_workspace(I3_CMD, char *which);
44 
50 
55 void cmd_move_con_to_workspace_name(I3_CMD, char *name);
56 
61 void cmd_move_con_to_workspace_number(I3_CMD, char *which);
62 
67 void cmd_resize(I3_CMD, char *way, char *direction, char *resize_px, char *resize_ppt);
68 
73 void cmd_border(I3_CMD, char *border_style_str, char *border_width);
74 
79 void cmd_nop(I3_CMD, char *comment);
80 
85 void cmd_append_layout(I3_CMD, char *path);
86 
91 void cmd_workspace(I3_CMD, char *which);
92 
97 void cmd_workspace_number(I3_CMD, char *which);
98 
104 
109 void cmd_workspace_name(I3_CMD, char *name);
110 
115 void cmd_mark(I3_CMD, char *mark);
116 
121 void cmd_unmark(I3_CMD, char *mark);
122 
127 void cmd_mode(I3_CMD, char *mode);
128 
133 void cmd_move_con_to_output(I3_CMD, char *name);
134 
139 void cmd_floating(I3_CMD, char *floating_mode);
140 
145 void cmd_move_workspace_to_output(I3_CMD, char *name);
146 
151 void cmd_split(I3_CMD, char *direction);
152 
157 void cmd_kill(I3_CMD, char *kill_mode_str);
158 
163 void cmd_exec(I3_CMD, char *nosn, char *command);
164 
169 void cmd_focus_direction(I3_CMD, char *direction);
170 
175 void cmd_focus_window_mode(I3_CMD, char *window_mode);
176 
181 void cmd_focus_level(I3_CMD, char *level);
182 
187 void cmd_focus(I3_CMD);
188 
193 void cmd_fullscreen(I3_CMD, char *fullscreen_mode);
194 
199 void cmd_move_direction(I3_CMD, char *direction, char *move_px);
200 
205 void cmd_layout(I3_CMD, char *layout_str);
206 
211 void cmd_layout_toggle(I3_CMD, char *toggle_mode);
212 
217 void cmd_exit(I3_CMD);
218 
223 void cmd_reload(I3_CMD);
224 
229 void cmd_restart(I3_CMD);
230 
235 void cmd_open(I3_CMD);
236 
241 void cmd_focus_output(I3_CMD, char *name);
242 
247 void cmd_move_window_to_position(I3_CMD, char *method, char *x, char *y);
248 
253 void cmd_move_window_to_center(I3_CMD, char *method);
254 
260 
266 
271 void cmd_rename_workspace(I3_CMD, char *old_name, char *new_name);
272 
277 void cmd_bar(I3_CMD, char *bar_type, char *bar_value, char *bar_id);
278 
279 /*
280  * Implementation of 'shmlog <size>|toggle|on|off'
281  *
282  */
283 void cmd_shmlog(I3_CMD, char *argument);
284 
285 /*
286  * Implementation of 'debuglog toggle|on|off'
287  *
288  */
289 void cmd_debuglog(I3_CMD, char *argument);
void cmd_scratchpad_show(I3_CMD)
Implementation of &#39;scratchpad show&#39;.
Definition: commands.c:1861
void cmd_move_con_to_workspace_name(I3_CMD, char *name)
Implementation of &#39;move [window|container] [to] workspace &lt;name&gt;&#39;.
Definition: commands.c:492
void cmd_shmlog(I3_CMD, char *argument)
Definition: commands.c:2067
void cmd_resize(I3_CMD, char *way, char *direction, char *resize_px, char *resize_ppt)
Implementation of &#39;resize grow|shrink &lt;direction&gt; [&lt;px&gt; px] [or &lt;ppt&gt; ppt]&#39;.
Definition: commands.c:775
void cmd_nop(I3_CMD, char *comment)
Implementation of &#39;nop &lt;comment&gt;&#39;.
Definition: commands.c:873
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:288
void cmd_floating(I3_CMD, char *floating_mode)
Implementation of &#39;floating enable|disable|toggle&#39;.
Definition: commands.c:1149
void cmd_move_window_to_center(I3_CMD, char *method)
Implementation of &#39;move [window|container] [to] [absolute] position center.
Definition: commands.c:1804
void cmd_move_direction(I3_CMD, char *direction, char *move_px)
Implementation of &#39;move &lt;direction&gt; [&lt;pixels&gt; [px]]&#39;.
Definition: commands.c:1551
void cmd_move_window_to_position(I3_CMD, char *method, char *cx, char *cy)
Implementation of &#39;move [window|container] [to] [absolute] position &lt;px&gt; [px] &lt;px&gt; [px]...
Definition: commands.c:1767
void cmd_focus(I3_CMD)
Implementation of &#39;focus&#39;.
Definition: commands.c:1453
void cmd_workspace(I3_CMD, char *which)
Implementation of &#39;workspace next|prev|next_on_output|prev_on_output&#39;.
Definition: commands.c:924
void cmd_focus_window_mode(I3_CMD, char *window_mode)
Implementation of &#39;focus tiling|floating|mode_toggle&#39;.
Definition: commands.c:1393
void cmd_split(I3_CMD, char *direction)
Implementation of &#39;split v|h|vertical|horizontal&#39;.
Definition: commands.c:1294
void cmd_move_con_to_workspace_number(I3_CMD, char *which)
Implementation of &#39;move [window|container] [to] workspace number &lt;number&gt;&#39;.
Definition: commands.c:536
void cmd_mark(I3_CMD, char *mark)
Implementation of &#39;mark &lt;mark&gt;&#39;.
Definition: commands.c:1027
void cmd_border(I3_CMD, char *border_style_str, char *border_width)
Implementation of &#39;border normal|none|1pixel|toggle&#39;.
Definition: commands.c:820
void cmd_layout(I3_CMD, char *layout_str)
Implementation of &#39;layout default|stacked|stacking|tabbed|splitv|splith&#39;.
Definition: commands.c:1583
void cmd_open(I3_CMD)
Implementation of &#39;open&#39;.
Definition: commands.c:1705
void cmd_criteria_add(I3_CMD, char *ctype, char *cvalue)
Interprets a ctype=cvalue pair and adds it to the current match specification.
Definition: commands.c:337
void cmd_mode(I3_CMD, char *mode)
Implementation of &#39;mode &lt;string&gt;&#39;.
Definition: commands.c:1080
void cmd_move_con_to_output(I3_CMD, char *name)
Implementation of &#39;move [window|container] [to] output &lt;str&gt;&#39;.
Definition: commands.c:1092
void cmd_rename_workspace(I3_CMD, char *old_name, char *new_name)
Implementation of &#39;rename workspace &lt;name&gt; to &lt;name&gt;&#39;.
Definition: commands.c:1883
void cmd_workspace_back_and_forth(I3_CMD)
Implementation of &#39;workspace back_and_forth&#39;.
Definition: commands.c:994
void cmd_move_con_to_workspace(I3_CMD, char *which)
Implementation of &#39;move [window|container] [to] workspace next|prev|next_on_output|prev_on_output&#39;.
Definition: commands.c:416
void cmd_move_workspace_to_output(I3_CMD, char *name)
Implementation of &#39;move workspace to [output] &lt;str&gt;&#39;.
Definition: commands.c:1180
#define I3_CMD
The beginning of the prototype for every cmd_ function.
Definition: commands.h:15
void cmd_fullscreen(I3_CMD, char *fullscreen_mode)
Implementation of &#39;fullscreen [global]&#39;.
Definition: commands.c:1529
void cmd_focus_direction(I3_CMD, char *direction)
Implementation of &#39;focus left|right|up|down&#39;.
Definition: commands.c:1367
void cmd_append_layout(I3_CMD, char *path)
Implementation of &#39;append_layout &lt;path&gt;&#39;.
Definition: commands.c:883
void cmd_focus_output(I3_CMD, char *name)
Implementation of &#39;focus output &lt;output&gt;&#39;.
Definition: commands.c:1725
void cmd_layout_toggle(I3_CMD, char *toggle_mode)
Implementation of &#39;layout toggle [all|split]&#39;.
Definition: commands.c:1625
void cmd_reload(I3_CMD)
Implementation of &#39;reload&#39;.
Definition: commands.c:1666
void cmd_exit(I3_CMD)
Implementation of &#39;exit&#39;.
Definition: commands.c:1652
void cmd_exec(I3_CMD, char *nosn, char *command)
Implementation of &#39;exec [–no-startup-id] &lt;command&gt;&#39;.
Definition: commands.c:1353
void cmd_workspace_number(I3_CMD, char *which)
Implementation of &#39;workspace number &lt;number&gt;&#39;.
Definition: commands.c:954
void cmd_bar(I3_CMD, char *bar_type, char *bar_value, char *bar_id)
Implementation of &#39;bar (hidden_state hide|show|toggle)|(mode dock|hide|invisible|toggle) [&lt;bar_id&gt;]&#39;...
Definition: commands.c:2045
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.
uint32_t y
Definition: data.h:31
void cmd_workspace_name(I3_CMD, char *name)
Implementation of &#39;workspace &lt;name&gt;&#39;.
Definition: commands.c:1006
void cmd_kill(I3_CMD, char *kill_mode_str)
Implementation of &#39;kill [window|client]&#39;.
Definition: commands.c:1316
void cmd_focus_level(I3_CMD, char *level)
Implementation of &#39;focus parent|child&#39;.
Definition: commands.c:1425
void cmd_move_scratchpad(I3_CMD)
Implementation of &#39;move scratchpad&#39;.
Definition: commands.c:1841
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:465
void cmd_restart(I3_CMD)
Implementation of &#39;restart&#39;.
Definition: commands.c:1685
uint32_t x
Definition: data.h:30
void cmd_unmark(I3_CMD, char *mark)
Implementation of &#39;unmark [mark]&#39;.
Definition: commands.c:1055
void cmd_debuglog(I3_CMD, char *argument)
Definition: commands.c:2098