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 "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, const char *ctype, const char *cvalue);
37 
43 void cmd_move_con_to_workspace(I3_CMD, const char *which);
44 
50 
55 void cmd_move_con_to_workspace_name(I3_CMD, const char *name, const char *no_auto_back_and_forth);
56 
61 void cmd_move_con_to_workspace_number(I3_CMD, const char *which, const char *no_auto_back_and_forth);
62 
67 void cmd_resize_set(I3_CMD, long cwidth, long cheight);
68 
73 void cmd_resize(I3_CMD, const char *way, const char *direction, long resize_px, long resize_ppt);
74 
79 void cmd_border(I3_CMD, const char *border_style_str, long border_width);
80 
85 void cmd_nop(I3_CMD, const char *comment);
86 
91 void cmd_append_layout(I3_CMD, const char *path);
92 
97 void cmd_workspace(I3_CMD, const char *which);
98 
103 void cmd_workspace_number(I3_CMD, const char *which, const char *no_auto_back_and_forth);
104 
110 
115 void cmd_workspace_name(I3_CMD, const char *name, const char *no_auto_back_and_forth);
116 
121 void cmd_mark(I3_CMD, const char *mark, const char *mode, const char *toggle);
122 
127 void cmd_unmark(I3_CMD, const char *mark);
128 
133 void cmd_mode(I3_CMD, const char *mode);
134 
139 void cmd_move_con_to_output(I3_CMD, const char *name);
140 
145 void cmd_move_con_to_mark(I3_CMD, const char *mark);
146 
151 void cmd_floating(I3_CMD, const char *floating_mode);
152 
157 void cmd_move_workspace_to_output(I3_CMD, const char *name);
158 
163 void cmd_split(I3_CMD, const char *direction);
164 
169 void cmd_kill(I3_CMD, const char *kill_mode_str);
170 
175 void cmd_exec(I3_CMD, const char *nosn, const char *command);
176 
181 void cmd_focus_direction(I3_CMD, const char *direction);
182 
187 void cmd_focus_window_mode(I3_CMD, const char *window_mode);
188 
193 void cmd_focus_level(I3_CMD, const char *level);
194 
199 void cmd_focus(I3_CMD);
200 
205 void cmd_fullscreen(I3_CMD, const char *action, const char *fullscreen_mode);
206 
211 void cmd_sticky(I3_CMD, const char *action);
212 
217 void cmd_move_direction(I3_CMD, const char *direction, long move_px);
218 
223 void cmd_layout(I3_CMD, const char *layout_str);
224 
229 void cmd_layout_toggle(I3_CMD, const char *toggle_mode);
230 
235 void cmd_exit(I3_CMD);
236 
241 void cmd_reload(I3_CMD);
242 
247 void cmd_restart(I3_CMD);
248 
253 void cmd_open(I3_CMD);
254 
259 void cmd_focus_output(I3_CMD, const char *name);
260 
265 void cmd_move_window_to_position(I3_CMD, const char *method, long x, long y);
266 
271 void cmd_move_window_to_center(I3_CMD, const char *method);
272 
278 
284 
290 
295 void cmd_title_format(I3_CMD, const char *format);
296 
301 void cmd_rename_workspace(I3_CMD, const char *old_name, const char *new_name);
302 
307 void cmd_bar(I3_CMD, const char *bar_type, const char *bar_value, const char *bar_id);
308 
309 /*
310  * Implementation of 'shmlog <size>|toggle|on|off'
311  *
312  */
313 void cmd_shmlog(I3_CMD, const char *argument);
314 
315 /*
316  * Implementation of 'debuglog toggle|on|off'
317  *
318  */
319 void cmd_debuglog(I3_CMD, const char *argument);
void cmd_rename_workspace(I3_CMD, const char *old_name, const char *new_name)
Implementation of 'rename workspace to '.
Definition: commands.c:1880
void cmd_mode(I3_CMD, const char *mode)
Implementation of 'mode '.
Definition: commands.c:1017
void cmd_fullscreen(I3_CMD, const char *action, const char *fullscreen_mode)
Implementation of 'fullscreen [enable|disable|toggle] [global]'.
Definition: commands.c:1390
void cmd_title_format(I3_CMD, const char *format)
Implementation of 'title_format '.
Definition: commands.c:1837
void cmd_workspace_number(I3_CMD, const char *which, const char *no_auto_back_and_forth)
Implementation of 'workspace [–no-auto-back-and-forth] number '.
Definition: commands.c:876
void cmd_restart(I3_CMD)
Implementation of 'restart'.
Definition: commands.c:1601
void cmd_move_workspace_to_output(I3_CMD, const char *name)
Implementation of 'move workspace to [output] '.
Definition: commands.c:1118
void cmd_scratchpad_show(I3_CMD)
Implementation of 'scratchpad show'.
Definition: commands.c:1815
void cmd_split(I3_CMD, const char *direction)
Implementation of 'split v|h|t|vertical|horizontal|toggle'.
Definition: commands.c:1143
void cmd_move_window_to_center(I3_CMD, const char *method)
Implementation of 'move [window|container] [to] [absolute] position center.
Definition: commands.c:1727
void cmd_border(I3_CMD, const char *border_style_str, long border_width)
Implementation of 'border normal|pixel []', 'border none|1pixel|toggle'.
Definition: commands.c:719
void cmd_mark(I3_CMD, const char *mark, const char *mode, const char *toggle)
Implementation of 'mark [–add|–replace] [–toggle] '.
Definition: commands.c:965
void cmd_focus_window_mode(I3_CMD, const char *window_mode)
Implementation of 'focus tiling|floating|mode_toggle'.
Definition: commands.c:1255
void cmd_open(I3_CMD)
Implementation of 'open'.
Definition: commands.c:1618
void cmd_focus_level(I3_CMD, const char *level)
Implementation of 'focus parent|child'.
Definition: commands.c:1286
void cmd_bar(I3_CMD, const char *bar_type, const char *bar_value, const char *bar_id)
Implementation of 'bar (hidden_state hide|show|toggle)|(mode dock|hide|invisible|toggle) []'...
Definition: commands.c:2058
void cmd_layout(I3_CMD, const char *layout_str)
Implementation of 'layout default|stacked|stacking|tabbed|splitv|splith'.
Definition: commands.c:1494
void cmd_move_con_to_workspace_back_and_forth(I3_CMD)
Implementation of 'move [window|container] [to] workspace back_and_forth'.
Definition: commands.c:335
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.
void cmd_workspace(I3_CMD, const char *which)
Implementation of 'workspace next|prev|next_on_output|prev_on_output'.
Definition: commands.c:840
void cmd_move_window_to_position(I3_CMD, const char *method, long x, long y)
Implementation of 'move [window|container] [to] [absolute] position [px] [px]...
Definition: commands.c:1680
void cmd_move_con_to_workspace(I3_CMD, const char *which)
Implementation of 'move [window|container] [to] workspace next|prev|next_on_output|prev_on_output'.
Definition: commands.c:286
void cmd_move_con_to_workspace_name(I3_CMD, const char *name, const char *no_auto_back_and_forth)
Implementation of 'move [–no-auto-back-and-forth] [window|container] [to] workspace '...
Definition: commands.c:362
void cmd_focus_output(I3_CMD, const char *name)
Implementation of 'focus output '.
Definition: commands.c:1638
#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:918
void cmd_resize(I3_CMD, const char *way, const char *direction, long resize_px, long resize_ppt)
Implementation of 'resize grow|shrink [ px] [or ppt]'.
Definition: commands.c:648
void cmd_sticky(I3_CMD, const char *action)
Implementation of 'sticky enable|disable|toggle'.
Definition: commands.c:1417
void cmd_focus(I3_CMD)
Implementation of 'focus'.
Definition: commands.c:1314
void cmd_layout_toggle(I3_CMD, const char *toggle_mode)
Implementation of 'layout toggle [all|split]'.
Definition: commands.c:1538
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:277
void cmd_exec(I3_CMD, const char *nosn, const char *command)
Implementation of 'exec [–no-startup-id] '.
Definition: commands.c:1215
void cmd_floating(I3_CMD, const char *floating_mode)
Implementation of 'floating enable|disable|toggle'.
Definition: commands.c:1087
void cmd_debuglog(I3_CMD, const char *argument)
Definition: commands.c:2111
void cmd_append_layout(I3_CMD, const char *path)
Implementation of 'append_layout '.
Definition: commands.c:778
void cmd_shmlog(I3_CMD, const char *argument)
Definition: commands.c:2080
uint32_t x
Definition: data.h:120
void cmd_exit(I3_CMD)
Implementation of 'exit'.
Definition: commands.c:1565
void cmd_move_con_to_workspace_number(I3_CMD, const char *which, const char *no_auto_back_and_forth)
Implementation of 'move [–no-auto-back-and-forth] [window|container] [to] workspace number ...
Definition: commands.c:408
void cmd_move_window_to_mouse(I3_CMD)
Implementation of 'move [window|container] [to] position mouse'.
Definition: commands.c:1771
void cmd_move_scratchpad(I3_CMD)
Implementation of 'move scratchpad'.
Definition: commands.c:1795
void cmd_unmark(I3_CMD, const char *mark)
Implementation of 'unmark [mark]'.
Definition: commands.c:998
void cmd_move_con_to_output(I3_CMD, const char *name)
Implementation of 'move [window|container] [to] output '.
Definition: commands.c:1029
uint32_t y
Definition: data.h:121
void cmd_workspace_name(I3_CMD, const char *name, const char *no_auto_back_and_forth)
Implementation of 'workspace [–no-auto-back-and-forth] '.
Definition: commands.c:936
void cmd_kill(I3_CMD, const char *kill_mode_str)
Implementation of 'kill [window|client]'.
Definition: commands.c:1182
void cmd_nop(I3_CMD, const char *comment)
Implementation of 'nop '.
Definition: commands.c:768
void cmd_resize_set(I3_CMD, long cwidth, long cheight)
Implementation of 'resize set [px] [px]'.
Definition: commands.c:691
void cmd_move_con_to_mark(I3_CMD, const char *mark)
Implementation of 'move [window|container] [to] mark '.
Definition: commands.c:1067
void cmd_reload(I3_CMD)
Implementation of 'reload'.
Definition: commands.c:1582
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:194
void cmd_focus_direction(I3_CMD, const char *direction)
Implementation of 'focus left|right|up|down'.
Definition: commands.c:1229
void cmd_move_direction(I3_CMD, const char *direction, long move_px)
Implementation of 'move [ [px]]'.
Definition: commands.c:1455