i3
commands.h
Go to the documentation of this file.
1/*
2 * vim:ts=4:sw=4:expandtab
3 *
4 * i3 - an improved 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
38void cmd_criteria_add(I3_CMD, const char *ctype, const char *cvalue);
39
45void cmd_move_con_to_workspace(I3_CMD, const char *which);
46
52
57void cmd_move_con_to_workspace_name(I3_CMD, const char *name, const char *no_auto_back_and_forth);
58
63void cmd_move_con_to_workspace_number(I3_CMD, const char *which, const char *no_auto_back_and_forth);
64
69void cmd_resize_set(I3_CMD, long cwidth, const char *mode_width, long cheight, const char *mode_height);
70
75void cmd_resize(I3_CMD, const char *way, const char *direction, long resize_px, long resize_ppt);
76
81void cmd_border(I3_CMD, const char *border_style_str, long border_width);
82
87void cmd_nop(I3_CMD, const char *comment);
88
93void cmd_append_layout(I3_CMD, const char *path);
94
99void cmd_workspace(I3_CMD, const char *which);
100
105void cmd_workspace_number(I3_CMD, const char *which, const char *no_auto_back_and_forth);
106
112
117void cmd_workspace_name(I3_CMD, const char *name, const char *no_auto_back_and_forth);
118
123void cmd_mark(I3_CMD, const char *mark, const char *mode, const char *toggle);
124
129void cmd_unmark(I3_CMD, const char *mark);
130
135void cmd_mode(I3_CMD, const char *mode);
136
141void cmd_move_con_to_output(I3_CMD, const char *name, bool move_workspace);
142
147void cmd_move_con_to_mark(I3_CMD, const char *mark);
148
153void cmd_floating(I3_CMD, const char *floating_mode);
154
159void cmd_split(I3_CMD, const char *direction);
160
165void cmd_kill(I3_CMD, const char *kill_mode_str);
166
171void cmd_exec(I3_CMD, const char *nosn, const char *command);
172
177void cmd_focus_direction(I3_CMD, const char *direction);
178
183void cmd_focus_sibling(I3_CMD, const char *direction);
184
189void cmd_focus_window_mode(I3_CMD, const char *window_mode);
190
195void cmd_focus_level(I3_CMD, const char *level);
196
201void cmd_focus(I3_CMD, bool focus_workspace);
202
207void cmd_fullscreen(I3_CMD, const char *action, const char *fullscreen_mode);
208
213void cmd_sticky(I3_CMD, const char *action);
214
219void cmd_move_direction(I3_CMD, const char *direction_str, long amount, const char *mode);
220
225void cmd_layout(I3_CMD, const char *layout_str);
226
231void cmd_layout_toggle(I3_CMD, const char *toggle_mode);
232
237void cmd_exit(I3_CMD);
238
243void cmd_reload(I3_CMD);
244
249void cmd_restart(I3_CMD);
250
255void cmd_open(I3_CMD);
256
261void cmd_focus_output(I3_CMD, const char *name);
262
267void cmd_move_window_to_position(I3_CMD, long x, const char *mode_x, long y, const char *mode_y);
268
273void cmd_move_window_to_center(I3_CMD, const char *method);
274
280
286
292
297void cmd_swap(I3_CMD, const char *mode, const char *arg);
298
303void cmd_title_format(I3_CMD, const char *format);
304
309void cmd_rename_workspace(I3_CMD, const char *old_name, const char *new_name);
310
315void cmd_bar_mode(I3_CMD, const char *bar_mode, const char *bar_id);
316
321void cmd_bar_hidden_state(I3_CMD, const char *bar_hidden_state, const char *bar_id);
322
327void cmd_shmlog(I3_CMD, const char *argument);
328
333void cmd_debuglog(I3_CMD, const char *argument);
334
339void cmd_gaps(I3_CMD, const char *type, const char *scope, const char *mode, const char *value);
340
345void cmd_title_window_icon(I3_CMD, const char *enable, int padding);
#define y(x,...)
Definition commands.c:18
void cmd_focus_sibling(I3_CMD, const char *direction)
Implementation of 'focus next|prev sibling'.
Definition commands.c:1365
void cmd_move_con_to_mark(I3_CMD, const char *mark)
Implementation of 'move [window|container] [to] mark <str>'.
Definition commands.c:1160
void cmd_focus(I3_CMD, bool focus_workspace)
Implementation of 'focus'.
Definition commands.c:1468
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 <number>'.
Definition commands.c:380
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 <number>'.
Definition commands.c:896
void cmd_focus_direction(I3_CMD, const char *direction)
Implementation of 'focus left|right|up|down'.
Definition commands.c:1327
void cmd_mode(I3_CMD, const char *mode)
Implementation of 'mode <string>'.
Definition commands.c:1022
void cmd_nop(I3_CMD, const char *comment)
Implementation of 'nop <comment>'.
Definition commands.c:769
void cmd_rename_workspace(I3_CMD, const char *old_name, const char *new_name)
Implementation of 'rename workspace <name> to <name>'.
Definition commands.c:2150
void cmd_sticky(I3_CMD, const char *action)
Implementation of 'sticky enable|disable|toggle'.
Definition commands.c:1550
void cmd_bar_hidden_state(I3_CMD, const char *bar_hidden_state, const char *bar_id)
Implementation of 'bar hidden_state hide|show|toggle [<bar_id>]'.
Definition commands.c:2302
void cmd_bar_mode(I3_CMD, const char *bar_mode, const char *bar_id)
Implementation of 'bar mode dock|hide|invisible|toggle [<bar_id>]'.
Definition commands.c:2243
void cmd_floating(I3_CMD, const char *floating_mode)
Implementation of 'floating enable|disable|toggle'.
Definition commands.c:1180
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:172
void cmd_criteria_init(I3_CMD)
Initializes the specified 'Match' data structure and the initial state of commands....
void cmd_focus_window_mode(I3_CMD, const char *window_mode)
Implementation of 'focus tiling|floating|mode_toggle'.
Definition commands.c:1400
void cmd_mark(I3_CMD, const char *mark, const char *mode, const char *toggle)
Implementation of 'mark [–add|–replace] [–toggle] <mark>'.
Definition commands.c:970
void cmd_resize(I3_CMD, const char *way, const char *direction, long resize_px, long resize_ppt)
Implementation of 'resize grow|shrink <direction> [<px> px] [or <ppt> ppt]'.
Definition commands.c:580
void cmd_move_con_to_output(I3_CMD, const char *name, bool move_workspace)
Implementation of 'move [window|container] [to] output <str>'.
Definition commands.c:1109
void cmd_exec(I3_CMD, const char *nosn, const char *command)
Implementation of 'exec [–no-startup-id] <command>'.
Definition commands.c:1283
void cmd_move_window_to_position(I3_CMD, long x, const char *mode_x, long y, const char *mode_y)
Implementation of 'move [window|container] [to] [absolute] position [<pos_x> [px|ppt] <pos_y> [px|ppt...
Definition commands.c:1848
void cmd_move_con_to_workspace_back_and_forth(I3_CMD)
Implementation of 'move [window|container] [to] workspace back_and_forth'.
Definition commands.c:333
void cmd_restart(I3_CMD)
Implementation of 'restart'.
Definition commands.c:1734
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 <name>'.
Definition commands.c:353
void cmd_workspace_name(I3_CMD, const char *name, const char *no_auto_back_and_forth)
Implementation of 'workspace [–no-auto-back-and-forth] <name>'.
Definition commands.c:944
void cmd_move_window_to_mouse(I3_CMD)
Implementation of 'move [window|container] [to] position mouse'.
Definition commands.c:1933
void cmd_resize_set(I3_CMD, long cwidth, const char *mode_width, long cheight, const char *mode_height)
Implementation of 'resize set <width> [px | ppt] <height> [px | ppt]'.
Definition commands.c:659
void cmd_focus_level(I3_CMD, const char *level)
Implementation of 'focus parent|child'.
Definition commands.c:1438
void cmd_swap(I3_CMD, const char *mode, const char *arg)
Implementation of 'swap [container] [with] id|con_id|mark <arg>'.
Definition commands.c:2000
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:256
#define I3_CMD
The beginning of the prototype for every cmd_ function.
Definition commands.h:17
void cmd_layout(I3_CMD, const char *layout_str)
Implementation of 'layout default|stacked|stacking|tabbed|splitv|splith'.
Definition commands.c:1634
void cmd_title_window_icon(I3_CMD, const char *enable, int padding)
Implementation of 'title_window_icon <yes|no|toggle>' and 'title_window_icon <padding|toggle> <px>'.
Definition commands.c:2101
void cmd_workspace(I3_CMD, const char *which)
Implementation of 'workspace next|prev|next_on_output|prev_on_output'.
Definition commands.c:865
void cmd_gaps(I3_CMD, const char *type, const char *scope, const char *mode, const char *value)
Implementation of 'gaps inner|outer|top|right|bottom|left|horizontal|vertical current|all set|plus|mi...
Definition commands.c:2513
void cmd_unmark(I3_CMD, const char *mark)
Implementation of 'unmark [mark]'.
Definition commands.c:1003
void cmd_fullscreen(I3_CMD, const char *action, const char *fullscreen_mode)
Implementation of 'fullscreen [enable|disable|toggle] [global]'.
Definition commands.c:1523
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:300
void cmd_open(I3_CMD)
Implementation of 'open'.
Definition commands.c:1766
void cmd_shmlog(I3_CMD, const char *argument)
Implementation of 'shmlog <size>|toggle|on|off'.
Definition commands.c:2359
void cmd_debuglog(I3_CMD, const char *argument)
Implementation of 'debuglog toggle|on|off'.
Definition commands.c:2391
void cmd_kill(I3_CMD, const char *kill_mode_str)
Implementation of 'kill [window|client]'.
Definition commands.c:1250
void cmd_move_direction(I3_CMD, const char *direction_str, long amount, const char *mode)
Implementation of 'move <direction> [<amount> [px|ppt]]'.
Definition commands.c:1589
void cmd_move_window_to_center(I3_CMD, const char *method)
Implementation of 'move [window|container] [to] [absolute] position center.
Definition commands.c:1888
void cmd_title_format(I3_CMD, const char *format)
Implementation of 'title_format <format>'.
Definition commands.c:2058
void cmd_layout_toggle(I3_CMD, const char *toggle_mode)
Implementation of 'layout toggle [all|split]'.
Definition commands.c:1665
void cmd_focus_output(I3_CMD, const char *name)
Implementation of 'focus output <output>'.
Definition commands.c:1786
void cmd_append_layout(I3_CMD, const char *path)
Implementation of 'append_layout <path>'.
Definition commands.c:780
void cmd_border(I3_CMD, const char *border_style_str, long border_width)
Implementation of 'border normal|pixel [<n>]', 'border none|1pixel|toggle'.
Definition commands.c:732
void cmd_scratchpad_show(I3_CMD)
Implementation of 'scratchpad show'.
Definition commands.c:1977
void cmd_split(I3_CMD, const char *direction)
Implementation of 'split v|h|t|vertical|horizontal|toggle'.
Definition commands.c:1211
void cmd_workspace_back_and_forth(I3_CMD)
Implementation of 'workspace back_and_forth'.
Definition commands.c:930
void cmd_reload(I3_CMD)
Implementation of 'reload'.
Definition commands.c:1704
void cmd_exit(I3_CMD)
Implementation of 'exit'.
Definition commands.c:1693
void cmd_move_scratchpad(I3_CMD)
Implementation of 'move scratchpad'.
Definition commands.c:1957