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_move_con_to_output(I3_CMD, char *name)
Implementation of 'move [window|container] [to] output <str>'.
Definition: commands.c:1092
void cmd_move_window_to_position(I3_CMD, char *method, char *x, char *y)
Implementation of 'move [window|container] [to] [absolute] position <px> [px] <px> [px]...
Definition: commands.c:1767
void cmd_move_window_to_center(I3_CMD, char *method)
Implementation of 'move [window|container] [to] [absolute] position center.
Definition: commands.c:1804
void cmd_focus_output(I3_CMD, char *name)
Implementation of 'focus output <output>'.
Definition: commands.c:1725
void cmd_border(I3_CMD, char *border_style_str, char *border_width)
Implementation of 'border normal|none|1pixel|toggle'.
Definition: commands.c:820
void cmd_move_con_to_workspace(I3_CMD, char *which)
Implementation of 'move [window|container] [to] workspace next|prev|next_on_output|prev_on_output'.
Definition: commands.c:416
void cmd_move_con_to_workspace_number(I3_CMD, char *which)
Implementation of 'move [window|container] [to] workspace number <number>'.
Definition: commands.c:536
void cmd_workspace_number(I3_CMD, char *which)
Implementation of 'workspace number <number>'.
Definition: commands.c:954
void cmd_mark(I3_CMD, char *mark)
Implementation of 'mark <mark>'.
Definition: commands.c:1027
void cmd_focus_direction(I3_CMD, char *direction)
Implementation of 'focus left|right|up|down'.
Definition: commands.c:1367
void cmd_restart(I3_CMD)
Implementation of 'restart'.
Definition: commands.c:1685
void cmd_workspace(I3_CMD, char *which)
Implementation of 'workspace next|prev|next_on_output|prev_on_output'.
Definition: commands.c:924
void cmd_scratchpad_show(I3_CMD)
Implementation of 'scratchpad show'.
Definition: commands.c:1861
void cmd_fullscreen(I3_CMD, char *fullscreen_mode)
Implementation of 'fullscreen [global]'.
Definition: commands.c:1529
void cmd_rename_workspace(I3_CMD, char *old_name, char *new_name)
Implementation of 'rename workspace <name> to <name>'.
Definition: commands.c:1883
void cmd_open(I3_CMD)
Implementation of 'open'.
Definition: commands.c:1705
void cmd_debuglog(I3_CMD, char *argument)
Definition: commands.c:2098
void cmd_kill(I3_CMD, char *kill_mode_str)
Implementation of 'kill [window|client]'.
Definition: commands.c:1316
void cmd_shmlog(I3_CMD, char *argument)
Definition: commands.c:2067
void cmd_floating(I3_CMD, char *floating_mode)
Implementation of 'floating enable|disable|toggle'.
Definition: commands.c:1149
void cmd_move_direction(I3_CMD, char *direction, char *move_px)
Implementation of 'move <direction> [<pixels> [px]]'.
Definition: commands.c:1551
void cmd_focus_window_mode(I3_CMD, char *window_mode)
Implementation of 'focus tiling|floating|mode_toggle'.
Definition: commands.c:1393
void cmd_move_workspace_to_output(I3_CMD, char *name)
Implementation of 'move workspace to [output] <str>'.
Definition: commands.c:1180
void cmd_unmark(I3_CMD, char *mark)
Implementation of 'unmark [mark]'.
Definition: commands.c:1055
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_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_split(I3_CMD, char *direction)
Implementation of 'split v|h|vertical|horizontal'.
Definition: commands.c:1294
void cmd_nop(I3_CMD, char *comment)
Implementation of 'nop <comment>'.
Definition: commands.c:873
void cmd_layout_toggle(I3_CMD, char *toggle_mode)
Implementation of 'layout toggle [all|split]'.
Definition: commands.c:1625
void cmd_focus(I3_CMD)
Implementation of 'focus'.
Definition: commands.c:1453
void cmd_exit(I3_CMD)
Implementation of 'exit'.
Definition: commands.c:1652
void cmd_append_layout(I3_CMD, char *path)
Implementation of 'append_layout <path>'.
Definition: commands.c:883
#define I3_CMD
The beginning of the prototype for every cmd_ function.
Definition: commands.h:15
void cmd_workspace_back_and_forth(I3_CMD)
Implementation of 'workspace back_and_forth'.
Definition: commands.c:994
void cmd_bar(I3_CMD, char *bar_type, char *bar_value, char *bar_id)
Implementation of 'bar (hidden_state hide|show|toggle)|(mode dock|hide|invisible|toggle) [<bar_id>]'...
Definition: commands.c:2045
void cmd_resize(I3_CMD, char *way, char *direction, char *resize_px, char *resize_ppt)
Implementation of 'resize grow|shrink <direction> [<px> px] [or <ppt> ppt]'.
Definition: commands.c:775
void cmd_focus_level(I3_CMD, char *level)
Implementation of 'focus parent|child'.
Definition: commands.c:1425
void cmd_workspace_name(I3_CMD, char *name)
Implementation of 'workspace <name>'.
Definition: commands.c:1006
void cmd_exec(I3_CMD, char *nosn, char *command)
Implementation of 'exec [–no-startup-id] <command>'.
Definition: commands.c:1353
void cmd_move_scratchpad(I3_CMD)
Implementation of 'move scratchpad'.
Definition: commands.c:1841
void cmd_move_con_to_workspace_name(I3_CMD, char *name)
Implementation of 'move [window|container] [to] workspace <name>'.
Definition: commands.c:492
void cmd_criteria_init(I3_CMD)
Initializes the specified 'Match' 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_reload(I3_CMD)
Implementation of 'reload'.
Definition: commands.c:1666
void cmd_mode(I3_CMD, char *mode)
Implementation of 'mode <string>'.
Definition: commands.c:1080
uint32_t x
Definition: data.h:30
void cmd_layout(I3_CMD, char *layout_str)
Implementation of 'layout default|stacked|stacking|tabbed|splitv|splith'.
Definition: commands.c:1583
void cmd_move_con_to_workspace_back_and_forth(I3_CMD)
Implementation of 'move [window|container] [to] workspace back_and_forth'.
Definition: commands.c:465