i3
|
Go to the source code of this file.
Data Structures | |
struct | owindow |
struct | user_output_name |
Macros | |
#define | y(x, ...) |
#define | ystr(str) |
#define | ysuccess(success) |
#define | yerror(format, ...) |
#define | HANDLE_INVALID_MATCH |
If an error occurred during parsing of the criteria, we want to exit instead of relying on fallback behavior. | |
#define | HANDLE_EMPTY_MATCH |
When the command did not include match criteria (!), we use the currently focused container. | |
#define | CHECK_MOVE_CON_TO_WORKSPACE |
#define | CMD_FOCUS_WARN_CHILDREN |
Typedefs | |
typedef struct owindow | owindow |
typedef struct user_output_name | user_output_name |
typedef int *(* | gap_accessor) (gaps_t *) |
Functions | |
static bool | maybe_back_and_forth (struct CommandResultIR *cmd_output, const char *name) |
static Con * | maybe_auto_back_and_forth_workspace (Con *workspace) |
typedef | TAILQ_HEAD (owindows_head, owindow) |
void | cmd_criteria_match_windows (I3_CMD) |
A match specification just finished (the closing square bracket was found), so we filter the list of owindows. | |
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. | |
static void | move_matches_to_workspace (Con *ws) |
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'. | |
void | cmd_move_con_to_workspace_back_and_forth (I3_CMD) |
Implementation of 'move [window|container] [to] workspace back_and_forth'. | |
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>'. | |
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>'. | |
static direction_t | parse_direction (const char *str) |
static void | cmd_resize_floating (I3_CMD, const char *direction_str, Con *floating_con, int px) |
static bool | cmd_resize_tiling_direction (I3_CMD, Con *current, const char *direction, int px, int ppt) |
static bool | cmd_resize_tiling_width_height (I3_CMD, Con *current, const char *direction, int px, double ppt) |
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]'. | |
static bool | resize_set_tiling (I3_CMD, Con *target, orientation_t resize_orientation, bool is_ppt, long target_size) |
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]'. | |
static int | border_width_from_style (border_style_t border_style, long border_width, Con *con) |
void | cmd_border (I3_CMD, const char *border_style_str, long border_width) |
Implementation of 'border normal|pixel [<n>]', 'border none|1pixel|toggle'. | |
void | cmd_nop (I3_CMD, const char *comment) |
Implementation of 'nop <comment>'. | |
void | cmd_append_layout (I3_CMD, const char *cpath) |
Implementation of 'append_layout <path>'. | |
static void | disable_global_fullscreen (void) |
void | cmd_workspace (I3_CMD, const char *which) |
Implementation of 'workspace next|prev|next_on_output|prev_on_output'. | |
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>'. | |
void | cmd_workspace_back_and_forth (I3_CMD) |
Implementation of 'workspace back_and_forth'. | |
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>'. | |
void | cmd_mark (I3_CMD, const char *mark, const char *mode, const char *toggle) |
Implementation of 'mark [–add|–replace] [–toggle] <mark>'. | |
void | cmd_unmark (I3_CMD, const char *mark) |
Implementation of 'unmark [mark]'. | |
void | cmd_mode (I3_CMD, const char *mode) |
Implementation of 'mode <string>'. | |
typedef | TAILQ_HEAD (user_output_names_head, user_output_name) |
static Output * | user_output_names_find_next (user_output_names_head *names, Output *current_output) |
static void | user_output_names_free (user_output_names_head *names) |
void | cmd_move_con_to_output (I3_CMD, const char *name, bool move_workspace) |
Implementation of 'move [window|container] [to] output <str>'. | |
void | cmd_move_con_to_mark (I3_CMD, const char *mark) |
Implementation of 'move [window|container] [to] mark <str>'. | |
void | cmd_floating (I3_CMD, const char *floating_mode) |
Implementation of 'floating enable|disable|toggle'. | |
void | cmd_split (I3_CMD, const char *direction) |
Implementation of 'split v|h|t|vertical|horizontal|toggle'. | |
void | cmd_kill (I3_CMD, const char *kill_mode_str) |
Implementation of 'kill [window|client]'. | |
void | cmd_exec (I3_CMD, const char *nosn, const char *command) |
Implementation of 'exec [–no-startup-id] <command>'. | |
void | cmd_focus_direction (I3_CMD, const char *direction_str) |
Implementation of 'focus left|right|up|down'. | |
void | cmd_focus_sibling (I3_CMD, const char *direction_str) |
Implementation of 'focus next|prev sibling'. | |
void | cmd_focus_window_mode (I3_CMD, const char *window_mode) |
Implementation of 'focus tiling|floating|mode_toggle'. | |
void | cmd_focus_level (I3_CMD, const char *level) |
Implementation of 'focus parent|child'. | |
void | cmd_focus (I3_CMD, bool focus_workspace) |
Implementation of 'focus'. | |
void | cmd_fullscreen (I3_CMD, const char *action, const char *fullscreen_mode) |
Implementation of 'fullscreen [enable|disable|toggle] [global]'. | |
void | cmd_sticky (I3_CMD, const char *action) |
Implementation of 'sticky enable|disable|toggle'. | |
void | cmd_move_direction (I3_CMD, const char *direction_str, long amount, const char *mode) |
Implementation of 'move <direction> [<amount> [px|ppt]]'. | |
void | cmd_layout (I3_CMD, const char *layout_str) |
Implementation of 'layout default|stacked|stacking|tabbed|splitv|splith'. | |
void | cmd_layout_toggle (I3_CMD, const char *toggle_mode) |
Implementation of 'layout toggle [all|split]'. | |
void | cmd_exit (I3_CMD) |
Implementation of 'exit'. | |
void | cmd_reload (I3_CMD) |
Implementation of 'reload'. | |
void | cmd_restart (I3_CMD) |
Implementation of 'restart'. | |
void | cmd_open (I3_CMD) |
Implementation of 'open'. | |
void | cmd_focus_output (I3_CMD, const char *name) |
Implementation of 'focus output <output>'. | |
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]]. | |
void | cmd_move_window_to_center (I3_CMD, const char *method) |
Implementation of 'move [window|container] [to] [absolute] position center. | |
void | cmd_move_window_to_mouse (I3_CMD) |
Implementation of 'move [window|container] [to] position mouse'. | |
void | cmd_move_scratchpad (I3_CMD) |
Implementation of 'move scratchpad'. | |
void | cmd_scratchpad_show (I3_CMD) |
Implementation of 'scratchpad show'. | |
void | cmd_swap (I3_CMD, const char *mode, const char *arg) |
Implementation of 'swap [container] [with] id|con_id|mark <arg>'. | |
void | cmd_title_format (I3_CMD, const char *format) |
Implementation of 'title_format <format>'. | |
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>'. | |
void | cmd_rename_workspace (I3_CMD, const char *old_name, const char *new_name) |
Implementation of 'rename workspace <name> to <name>'. | |
void | cmd_bar_mode (I3_CMD, const char *bar_mode, const char *bar_id) |
Implementation of 'bar mode dock|hide|invisible|toggle [<bar_id>]'. | |
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>]'. | |
void | cmd_shmlog (I3_CMD, const char *argument) |
Implementation of 'shmlog <size>|toggle|on|off'. | |
void | cmd_debuglog (I3_CMD, const char *argument) |
Implementation of 'debuglog toggle|on|off'. | |
static int * | gaps_inner (gaps_t *gaps) |
static int * | gaps_top (gaps_t *gaps) |
static int * | gaps_left (gaps_t *gaps) |
static int * | gaps_bottom (gaps_t *gaps) |
static int * | gaps_right (gaps_t *gaps) |
static bool | gaps_update (gap_accessor get, const char *scope, const char *mode, int pixels) |
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|minus|toggle <px>'. | |
#define CHECK_MOVE_CON_TO_WORKSPACE |
Definition at line 268 of file commands.c.
Referenced by cmd_move_con_to_workspace(), cmd_move_con_to_workspace_name(), and cmd_move_con_to_workspace_number().
#define CMD_FOCUS_WARN_CHILDREN |
Definition at line 1308 of file commands.c.
Referenced by cmd_focus(), cmd_focus_direction(), and cmd_focus_sibling().
#define HANDLE_EMPTY_MATCH |
When the command did not include match criteria (!), we use the currently focused container.
Do not confuse this case with a command which included criteria but which did not match any windows. This macro has to be called in every command.
Definition at line 59 of file commands.c.
Referenced by cmd_border(), cmd_exec(), cmd_floating(), cmd_focus_direction(), cmd_focus_output(), cmd_focus_sibling(), cmd_fullscreen(), cmd_kill(), cmd_layout(), cmd_mark(), cmd_move_con_to_mark(), cmd_move_con_to_output(), cmd_move_con_to_workspace_back_and_forth(), cmd_move_direction(), cmd_move_scratchpad(), cmd_move_window_to_center(), cmd_move_window_to_mouse(), cmd_move_window_to_position(), cmd_resize(), cmd_resize_set(), cmd_split(), cmd_sticky(), cmd_swap(), cmd_title_format(), and cmd_title_window_icon().
#define HANDLE_INVALID_MATCH |
If an error occurred during parsing of the criteria, we want to exit instead of relying on fallback behavior.
See #2091.
Definition at line 46 of file commands.c.
#define y | ( | x, | |
... ) |
Definition at line 18 of file commands.c.
Referenced by check_crossing_screen_boundary(), cmd_move_window_to_position(), cmd_open(), con_on_remove_child(), dump_bar_bindings(), dump_bar_config(), dump_binding(), dump_event_state_mask(), dump_gaps(), dump_node(), dump_rect(), fake_outputs_init(), find_drop_target(), floating_move_to_pointer(), floating_resize(), get_output_containing(), get_screen_at(), get_screen_at(), get_tree_next_workspace(), handle_configure_request(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), ipc_marshal_workspace_event(), ipc_send_barconfig_update_event(), ipc_send_binding_event(), ipc_send_shutdown_event(), ipc_send_window_event(), ipc_send_workspace_event(), render_output(), sighandler_draw_dialog(), update_placeholder_contents(), workspace_show(), and x_get_border_rectangles().
#define yerror | ( | format, | |
... ) |
Definition at line 29 of file commands.c.
Referenced by cmd_append_layout(), cmd_bar_hidden_state(), cmd_bar_mode(), cmd_border(), cmd_focus(), cmd_focus_output(), cmd_focus_window_mode(), cmd_kill(), cmd_layout(), cmd_mark(), cmd_move_con_to_output(), cmd_move_con_to_workspace(), cmd_move_con_to_workspace_back_and_forth(), cmd_move_con_to_workspace_name(), cmd_move_con_to_workspace_number(), cmd_move_window_to_center(), cmd_move_window_to_position(), cmd_rename_workspace(), cmd_resize(), cmd_resize_set(), cmd_resize_tiling_direction(), cmd_resize_tiling_width_height(), cmd_shmlog(), cmd_swap(), cmd_workspace(), cmd_workspace_name(), and cmd_workspace_number().
#define ystr | ( | str | ) |
Definition at line 19 of file commands.c.
Referenced by cmd_open(), dump_bar_bindings(), dump_bar_config(), dump_binding(), dump_event_state_mask(), dump_gaps(), dump_node(), dump_rect(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), ipc_marshal_workspace_event(), ipc_send_binding_event(), ipc_send_shutdown_event(), and ipc_send_window_event().
#define ysuccess | ( | success | ) |
Definition at line 20 of file commands.c.
Referenced by cmd_append_layout(), cmd_bar_hidden_state(), cmd_bar_mode(), cmd_border(), cmd_debuglog(), cmd_exec(), cmd_floating(), cmd_focus(), cmd_focus_direction(), cmd_focus_level(), cmd_focus_output(), cmd_focus_sibling(), cmd_focus_window_mode(), cmd_fullscreen(), cmd_gaps(), cmd_kill(), cmd_layout(), cmd_layout_toggle(), cmd_mark(), cmd_mode(), cmd_move_con_to_mark(), cmd_move_con_to_output(), cmd_move_con_to_workspace(), cmd_move_con_to_workspace_back_and_forth(), cmd_move_con_to_workspace_name(), cmd_move_con_to_workspace_number(), cmd_move_direction(), cmd_move_scratchpad(), cmd_move_window_to_center(), cmd_move_window_to_mouse(), cmd_move_window_to_position(), cmd_nop(), cmd_reload(), cmd_rename_workspace(), cmd_resize(), cmd_resize_set(), cmd_scratchpad_show(), cmd_shmlog(), cmd_split(), cmd_sticky(), cmd_swap(), cmd_title_format(), cmd_title_window_icon(), cmd_unmark(), cmd_workspace(), cmd_workspace_back_and_forth(), cmd_workspace_name(), and cmd_workspace_number().
typedef int *(* gap_accessor) (gaps_t *) |
Definition at line 2427 of file commands.c.
typedef struct owindow owindow |
typedef struct user_output_name user_output_name |
|
static |
Definition at line 708 of file commands.c.
References BS_NONE, BS_NORMAL, con_inside_floating(), config, Config::default_border, Config::default_border_width, Config::default_floating_border, Config::default_floating_border_width, and logical_px().
Referenced by cmd_border().
void cmd_append_layout | ( | I3_CMD | , |
const char * | cpath ) |
Implementation of 'append_layout <path>'.
Definition at line 780 of file commands.c.
References con_accepts_window(), con_get_output(), croot, DLOG, ELOG, focused, ipc_send_workspace_event(), JSON_CONTENT_UNKNOWN, JSON_CONTENT_WORKSPACE, json_determine_content(), json_validate(), LOG, output_get_content(), Con::parent, render_con(), resolve_tilde(), restore_open_placeholder_windows(), slurp(), tree_append_json(), Con::type, yerror, and ysuccess.
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 at line 2302 of file commands.c.
References barconfigs, DLOG, ELOG, Barconfig::hidden_state, Barconfig::id, ipc_send_barconfig_update_event(), TAILQ_EMPTY, TAILQ_FOREACH, yerror, and ysuccess.
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 at line 2243 of file commands.c.
References barconfigs, DLOG, ELOG, Barconfig::id, ipc_send_barconfig_update_event(), Barconfig::mode, TAILQ_EMPTY, TAILQ_FOREACH, yerror, and ysuccess.
void cmd_border | ( | I3_CMD | , |
const char * | border_style_str, | ||
long | border_width ) |
Implementation of 'border normal|pixel [<n>]', 'border none|1pixel|toggle'.
Definition at line 732 of file commands.c.
References Con::border_style, border_width_from_style(), BS_NONE, BS_NORMAL, BS_PIXEL, owindow::con, con_set_border_style(), DLOG, HANDLE_EMPTY_MATCH, Con::max_user_border_style, Con::name, TAILQ_FOREACH, yerror, and ysuccess.
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 at line 256 of file commands.c.
References current_match, and match_parse_property().
void cmd_criteria_match_windows | ( | I3_CMD | ) |
A match specification just finished (the closing square bracket was found), so we filter the list of owindows.
Definition at line 172 of file commands.c.
References owindow::con, Match::con_id, current_match, DLOG, FREE, Match::mark, marks, match_matches_window(), Con::name, mark_t::name, regex_matches(), TAILQ_EMPTY, TAILQ_END, TAILQ_FIRST, TAILQ_FOREACH, TAILQ_INIT, TAILQ_INSERT_TAIL, TAILQ_NEXT, and Con::window.
void cmd_debuglog | ( | I3_CMD | , |
const char * | argument ) |
Implementation of 'debuglog toggle|on|off'.
Definition at line 2391 of file commands.c.
References get_debug_logging(), LOG, set_debug_logging(), and ysuccess.
void cmd_exec | ( | I3_CMD | , |
const char * | nosn, | ||
const char * | command ) |
Implementation of 'exec [–no-startup-id] <command>'.
Definition at line 1283 of file commands.c.
References DLOG, HANDLE_EMPTY_MATCH, LOG, start_application(), TAILQ_FOREACH, and ysuccess.
void cmd_exit | ( | I3_CMD | ) |
void cmd_floating | ( | I3_CMD | , |
const char * | floating_mode ) |
Implementation of 'floating enable|disable|toggle'.
Definition at line 1180 of file commands.c.
References owindow::con, DLOG, floating_disable(), floating_enable(), HANDLE_EMPTY_MATCH, Con::name, TAILQ_FOREACH, toggle_floating_mode(), and ysuccess.
void cmd_focus | ( | I3_CMD | , |
bool | focus_workspace ) |
Implementation of 'focus'.
Definition at line 1468 of file commands.c.
References CMD_FOCUS_WARN_CHILDREN, owindow::con, con_activate_unblock(), con_get_workspace(), current_match, DLOG, ELOG, LOG, match_is_empty(), maybe_auto_back_and_forth_workspace(), Con::name, scratchpad_show(), TAILQ_EMPTY, TAILQ_FOREACH, workspace_get(), workspace_show(), yerror, and ysuccess.
void cmd_focus_direction | ( | I3_CMD | , |
const char * | direction_str ) |
Implementation of 'focus left|right|up|down'.
Definition at line 1327 of file commands.c.
References AFTER, BEFORE, CMD_FOCUS_WARN_CHILDREN, owindow::con, con_get_workspace(), con_is_internal(), con_orientation(), D_LEFT, direction_from_orientation_position(), HANDLE_EMPTY_MATCH, Con::parent, parse_direction(), TAILQ_FOREACH, tree_next(), and ysuccess.
void cmd_focus_level | ( | I3_CMD | , |
const char * | level ) |
Implementation of 'focus parent|child'.
Definition at line 1438 of file commands.c.
References con_fullscreen_permits_focusing(), DLOG, ELOG, focused, level_down(), level_up(), Con::parent, and ysuccess.
void cmd_focus_output | ( | I3_CMD | , |
const char * | name ) |
Implementation of 'focus output <output>'.
Definition at line 1786 of file commands.c.
References owindow::con, xoutput::con, con_get_workspace(), con_is_internal(), focused, get_output_for_con(), GREP_FIRST, HANDLE_EMPTY_MATCH, output_get_content(), TAILQ_EMPTY, TAILQ_FOREACH, TAILQ_HEAD_INITIALIZER, user_output_names_find_next(), user_output_names_free(), workspace_is_visible(), workspace_show(), yerror, and ysuccess.
void cmd_focus_sibling | ( | I3_CMD | , |
const char * | direction_str ) |
Implementation of 'focus next|prev sibling'.
Definition at line 1365 of file commands.c.
References AFTER, BEFORE, CMD_FOCUS_WARN_CHILDREN, owindow::con, con_activate(), con_focus(), con_get_workspace(), con_is_internal(), get_tree_next_sibling(), HANDLE_EMPTY_MATCH, STARTS_WITH, TAILQ_FOREACH, Con::type, workspace_show(), and ysuccess.
void cmd_focus_window_mode | ( | I3_CMD | , |
const char * | window_mode ) |
Implementation of 'focus tiling|floating|mode_toggle'.
Definition at line 1400 of file commands.c.
References con_activate_unblock(), con_descend_focused(), con_get_workspace(), con_inside_floating(), DLOG, focused, TAILQ_FOREACH, Con::type, yerror, and ysuccess.
void cmd_fullscreen | ( | I3_CMD | , |
const char * | action, | ||
const char * | fullscreen_mode ) |
Implementation of 'fullscreen [enable|disable|toggle] [global]'.
Definition at line 1523 of file commands.c.
References CF_GLOBAL, CF_OUTPUT, owindow::con, con_disable_fullscreen(), con_enable_fullscreen(), con_toggle_fullscreen(), DLOG, HANDLE_EMPTY_MATCH, Con::name, TAILQ_FOREACH, and ysuccess.
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|minus|toggle <px>'.
Definition at line 2513 of file commands.c.
References ELOG, gaps_bottom(), gaps_inner(), gaps_left(), gaps_right(), gaps_top(), gaps_update(), logical_px(), and ysuccess.
void cmd_kill | ( | I3_CMD | , |
const char * | kill_mode_str ) |
Implementation of 'kill [window|client]'.
Definition at line 1250 of file commands.c.
References owindow::con, con_close(), DLOG, HANDLE_EMPTY_MATCH, KILL_CLIENT, KILL_WINDOW, TAILQ_FOREACH, yerror, and ysuccess.
void cmd_layout | ( | I3_CMD | , |
const char * | layout_str ) |
Implementation of 'layout default|stacked|stacking|tabbed|splitv|splith'.
Definition at line 1634 of file commands.c.
References owindow::con, con_is_docked(), con_set_layout(), DLOG, ELOG, HANDLE_EMPTY_MATCH, layout_from_name(), Con::name, TAILQ_FOREACH, yerror, and ysuccess.
void cmd_layout_toggle | ( | I3_CMD | , |
const char * | toggle_mode ) |
Implementation of 'layout toggle [all|split]'.
Definition at line 1665 of file commands.c.
References owindow::con, con_toggle_layout(), current_match, DLOG, focused, match_is_empty(), Con::name, TAILQ_FOREACH, and ysuccess.
void cmd_mark | ( | I3_CMD | , |
const char * | mark, | ||
const char * | mode, | ||
const char * | toggle ) |
Implementation of 'mark [–add|–replace] [–toggle] <mark>'.
Definition at line 970 of file commands.c.
References owindow::con, con_mark(), con_mark_toggle(), DLOG, HANDLE_EMPTY_MATCH, MM_ADD, MM_REPLACE, Con::name, TAILQ_FIRST, TAILQ_LAST, yerror, and ysuccess.
void cmd_mode | ( | I3_CMD | , |
const char * | mode ) |
Implementation of 'mode <string>'.
Definition at line 1022 of file commands.c.
References DLOG, switch_mode(), and ysuccess.
void cmd_move_con_to_mark | ( | I3_CMD | , |
const char * | mark ) |
Implementation of 'move [window|container] [to] mark <str>'.
Definition at line 1160 of file commands.c.
References owindow::con, con_move_to_mark(), DLOG, HANDLE_EMPTY_MATCH, Con::name, TAILQ_FOREACH, and ysuccess.
void cmd_move_con_to_output | ( | I3_CMD | , |
const char * | name, | ||
bool | move_workspace ) |
Implementation of 'move [window|container] [to] output <str>'.
Definition at line 1109 of file commands.c.
References owindow::con, con_get_workspace(), con_is_internal(), con_move_to_output(), get_output_for_con(), HANDLE_EMPTY_MATCH, TAILQ_EMPTY, TAILQ_FOREACH, TAILQ_HEAD_INITIALIZER, user_output_names_find_next(), user_output_names_free(), workspace_move_to_output(), yerror, and ysuccess.
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 at line 300 of file commands.c.
References CHECK_MOVE_CON_TO_WORKSPACE, con_get_workspace(), DLOG, focused, move_matches_to_workspace(), workspace_next(), workspace_next_on_output(), workspace_prev(), workspace_prev_on_output(), yerror, and ysuccess.
void cmd_move_con_to_workspace_back_and_forth | ( | I3_CMD | ) |
Implementation of 'move [window|container] [to] workspace back_and_forth'.
Definition at line 333 of file commands.c.
References HANDLE_EMPTY_MATCH, move_matches_to_workspace(), workspace_back_and_forth_get(), yerror, and ysuccess.
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 at line 353 of file commands.c.
References CHECK_MOVE_CON_TO_WORKSPACE, LOG, maybe_auto_back_and_forth_workspace(), move_matches_to_workspace(), workspace_get(), yerror, and ysuccess.
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 at line 380 of file commands.c.
References CHECK_MOVE_CON_TO_WORKSPACE, get_existing_workspace_by_num(), LOG, maybe_auto_back_and_forth_workspace(), move_matches_to_workspace(), workspace_get(), ws_name_to_number(), yerror, and ysuccess.
void cmd_move_direction | ( | I3_CMD | , |
const char * | direction_str, | ||
long | amount, | ||
const char * | mode ) |
Implementation of 'move <direction> [<amount> [px|ppt]]'.
Definition at line 1589 of file commands.c.
References owindow::con, con_get_output(), con_is_floating(), D_DOWN, D_LEFT, D_RIGHT, D_UP, DLOG, floating_reposition(), HANDLE_EMPTY_MATCH, Rect::height, Con::parent, parse_direction(), Con::rect, TAILQ_FOREACH, tree_move(), Rect::width, Rect::x, Rect::y, and ysuccess.
void cmd_move_scratchpad | ( | I3_CMD | ) |
Implementation of 'move scratchpad'.
Definition at line 1957 of file commands.c.
References owindow::con, DLOG, HANDLE_EMPTY_MATCH, Con::name, scratchpad_move(), TAILQ_FOREACH, and ysuccess.
void cmd_move_window_to_center | ( | I3_CMD | , |
const char * | method ) |
Implementation of 'move [window|container] [to] [absolute] position center.
Definition at line 1888 of file commands.c.
References owindow::con, con_get_workspace(), con_inside_floating(), croot, DLOG, ELOG, floating_center(), floating_maybe_reassign_ws(), HANDLE_EMPTY_MATCH, Con::name, Con::rect, TAILQ_FOREACH, yerror, and ysuccess.
void cmd_move_window_to_mouse | ( | I3_CMD | ) |
Implementation of 'move [window|container] [to] position mouse'.
Definition at line 1933 of file commands.c.
References owindow::con, con_inside_floating(), DLOG, floating_move_to_pointer(), HANDLE_EMPTY_MATCH, Con::name, TAILQ_FOREACH, and ysuccess.
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 at line 1848 of file commands.c.
References owindow::con, con_get_output(), con_is_floating(), DLOG, ELOG, floating_reposition(), HANDLE_EMPTY_MATCH, Rect::height, Con::parent, Con::rect, TAILQ_FOREACH, Rect::width, Rect::x, Rect::y, y, yerror, and ysuccess.
void cmd_nop | ( | I3_CMD | , |
const char * | comment ) |
Implementation of 'nop <comment>'.
Definition at line 769 of file commands.c.
void cmd_open | ( | I3_CMD | ) |
Implementation of 'open'.
Definition at line 1766 of file commands.c.
References con_activate(), L_SPLITH, Con::layout, LOG, tree_open_con(), y, and ystr.
void cmd_reload | ( | I3_CMD | ) |
Implementation of 'reload'.
Definition at line 1704 of file commands.c.
References barconfigs, C_RELOAD, command_error_nagbar_pid, config_error_nagbar_pid, ipc_send_barconfig_update_event(), ipc_send_workspace_event(), kill_nagbar(), load_configuration(), LOG, TAILQ_FOREACH, x_set_i3_atoms(), and ysuccess.
void cmd_rename_workspace | ( | I3_CMD | , |
const char * | old_name, | ||
const char * | new_name ) |
Implementation of 'rename workspace <name> to <name>'.
Definition at line 2150 of file commands.c.
References con_attach(), con_detach(), con_focus(), con_get_workspace(), ewmh_update_desktop_properties(), focused, FREE, get_assigned_output(), get_existing_workspace_by_name(), get_output_for_con(), GREP_FIRST, ipc_send_workspace_event(), LOG, Con::name, Con::num, Con::parent, previous_workspace_name, sstrdup(), startup_sequence_rename_workspace(), Con::type, workspace_move_to_output(), workspace_show(), ws_name_to_number(), yerror, and ysuccess.
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 at line 580 of file commands.c.
References cmd_resize_floating(), cmd_resize_tiling_direction(), cmd_resize_tiling_width_height(), owindow::con, con_inside_floating(), current_match, DLOG, Window::dock, HANDLE_EMPTY_MATCH, TAILQ_FOREACH, Con::window, yerror, and ysuccess.
|
static |
Definition at line 427 of file commands.c.
References con_descend_focused(), D_DOWN, D_LEFT, D_RIGHT, D_UP, floating_check_size(), Rect::height, Window::height_increment, orientation_from_direction(), parse_direction(), Con::rect, rect_equals(), Con::scratchpad_state, VERT, Rect::width, Window::width_increment, Con::window, Rect::x, and Rect::y.
Referenced by cmd_resize().
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 at line 659 of file commands.c.
References owindow::con, con_get_output(), con_inside_floating(), current_match, DLOG, Window::dock, floating_resize(), HANDLE_EMPTY_MATCH, Rect::height, HORIZ, Con::rect, resize_set_tiling(), TAILQ_FOREACH, VERT, Rect::width, Con::window, yerror, and ysuccess.
|
static |
Definition at line 486 of file commands.c.
References parse_direction(), resize_find_tiling_participants(), resize_neighboring_cons(), and yerror.
Referenced by cmd_resize().
|
static |
Definition at line 505 of file commands.c.
References con_num_children(), con_rect_size_in_orientation(), D_DOWN, D_LEFT, LOG, Con::parent, Con::percent, percent_for_1px(), resize_find_tiling_participants(), TAILQ_FOREACH, and yerror.
Referenced by cmd_resize(), and resize_set_tiling().
void cmd_restart | ( | I3_CMD | ) |
Implementation of 'restart'.
Definition at line 1734 of file commands.c.
References config, current_log_stream_socket_path, ELOG, i3_restart(), ipc_shutdown(), Config::ipc_socket_path, LOG, purge_zerobyte_logfile(), sasprintf(), and SHUTDOWN_REASON_RESTART.
void cmd_scratchpad_show | ( | I3_CMD | ) |
Implementation of 'scratchpad show'.
Definition at line 1977 of file commands.c.
References owindow::con, current_match, DLOG, match_is_empty(), Con::name, scratchpad_show(), TAILQ_FOREACH, and ysuccess.
void cmd_shmlog | ( | I3_CMD | , |
const char * | argument ) |
Implementation of 'shmlog <size>|toggle|on|off'.
Definition at line 2359 of file commands.c.
References default_shmlog_size, init_logging(), LOG, parse_long(), shmlog_size, update_shmlog_atom(), yerror, and ysuccess.
void cmd_split | ( | I3_CMD | , |
const char * | direction ) |
Implementation of 'split v|h|t|vertical|horizontal|toggle'.
Definition at line 1211 of file commands.c.
References owindow::con, con_is_docked(), DLOG, ELOG, HANDLE_EMPTY_MATCH, HORIZ, L_SPLITH, Con::layout, LOG, Con::name, Con::parent, TAILQ_FOREACH, tree_split(), Con::type, VERT, and ysuccess.
void cmd_sticky | ( | I3_CMD | , |
const char * | action ) |
Implementation of 'sticky enable|disable|toggle'.
Definition at line 1550 of file commands.c.
References owindow::con, DLOG, ELOG, ewmh_update_sticky(), ewmh_update_wm_desktop(), focused, HANDLE_EMPTY_MATCH, Window::id, Con::name, output_push_sticky_windows(), Con::sticky, TAILQ_FOREACH, Con::window, and ysuccess.
void cmd_swap | ( | I3_CMD | , |
const char * | mode, | ||
const char * | arg ) |
Implementation of 'swap [container] [with] id|con_id|mark <arg>'.
Definition at line 2000 of file commands.c.
References owindow::con, con_by_con_id(), con_by_mark(), con_by_window_id(), con_swap(), DLOG, HANDLE_EMPTY_MATCH, LOG, parse_long(), TAILQ_FIRST, TAILQ_LAST, yerror, and ysuccess.
void cmd_title_format | ( | I3_CMD | , |
const char * | format ) |
Implementation of 'title_format <format>'.
Definition at line 2058 of file commands.c.
References owindow::con, con_parse_title_format(), Con::deco_render_params, DLOG, ewmh_update_visible_name(), FREE, HANDLE_EMPTY_MATCH, i3string_as_utf8(), I3STRING_FREE, Window::id, Con::name, Window::name_x_changed, sstrdup(), TAILQ_FOREACH, Con::title_format, Con::window, and ysuccess.
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 at line 2101 of file commands.c.
References boolstr(), owindow::con, Con::deco_render_params, DLOG, FREE, HANDLE_EMPTY_MATCH, Con::name, Window::name_x_changed, TAILQ_FOREACH, Con::window, Con::window_icon_padding, and ysuccess.
void cmd_unmark | ( | I3_CMD | , |
const char * | mark ) |
Implementation of 'unmark [mark]'.
Definition at line 1003 of file commands.c.
References owindow::con, con_unmark(), current_match, match_is_empty(), TAILQ_FOREACH, and ysuccess.
void cmd_workspace | ( | I3_CMD | , |
const char * | which ) |
Implementation of 'workspace next|prev|next_on_output|prev_on_output'.
Definition at line 865 of file commands.c.
References disable_global_fullscreen(), DLOG, workspace_next(), workspace_next_on_output(), workspace_prev(), workspace_prev_on_output(), workspace_show(), yerror, and ysuccess.
void cmd_workspace_back_and_forth | ( | I3_CMD | ) |
Implementation of 'workspace back_and_forth'.
Definition at line 930 of file commands.c.
References disable_global_fullscreen(), workspace_back_and_forth(), and ysuccess.
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 at line 944 of file commands.c.
References disable_global_fullscreen(), DLOG, maybe_back_and_forth(), workspace_show_by_name(), yerror, and ysuccess.
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 at line 896 of file commands.c.
References disable_global_fullscreen(), get_existing_workspace_by_num(), LOG, maybe_back_and_forth(), Con::name, workspace_show(), workspace_show_by_name(), ws_name_to_number(), yerror, and ysuccess.
|
static |
Definition at line 854 of file commands.c.
References CF_GLOBAL, con_disable_fullscreen(), con_get_fullscreen_con(), and croot.
Referenced by cmd_workspace(), cmd_workspace_back_and_forth(), cmd_workspace_name(), and cmd_workspace_number().
|
static |
|
static |
Definition at line 2407 of file commands.c.
References gaps_t::inner.
Referenced by cmd_gaps(), and gaps_update().
|
static |
|
static |
|
static |
|
static |
Definition at line 2429 of file commands.c.
References con_get_workspace(), config, croot, DLOG, ELOG, focused, Con::gaps, Config::gaps, gaps_inner(), gaps_t::inner, output_get_content(), and TAILQ_FOREACH.
Referenced by cmd_gaps().
Definition at line 103 of file commands.c.
References con_get_workspace(), config, DLOG, focused, Config::workspace_auto_back_and_forth, and workspace_back_and_forth_get().
Referenced by cmd_focus(), cmd_move_con_to_workspace_name(), and cmd_move_con_to_workspace_number().
|
static |
Definition at line 83 of file commands.c.
References con_get_workspace(), config, DLOG, focused, Con::name, CommandResultIR::needs_tree_render, Config::workspace_auto_back_and_forth, and workspace_back_and_forth().
Referenced by cmd_workspace_name(), and cmd_workspace_number().
|
static |
Definition at line 260 of file commands.c.
References owindow::con, con_move_to_workspace(), DLOG, Con::name, and TAILQ_FOREACH.
Referenced by cmd_move_con_to_workspace(), cmd_move_con_to_workspace_back_and_forth(), cmd_move_con_to_workspace_name(), and cmd_move_con_to_workspace_number().
|
static |
Definition at line 412 of file commands.c.
References D_DOWN, D_LEFT, D_RIGHT, D_UP, and ELOG.
Referenced by cmd_focus_direction(), cmd_move_direction(), cmd_resize_floating(), and cmd_resize_tiling_direction().
|
static |
Definition at line 626 of file commands.c.
References cmd_resize_tiling_width_height(), current_match, D_DOWN, D_LEFT, Rect::height, HORIZ, Con::percent, Con::rect, resize_find_tiling_participants(), and Rect::width.
Referenced by cmd_resize_set().
typedef TAILQ_HEAD | ( | owindows_head, | |
owindow | ) |
Definition at line 137 of file commands.c.
References all_cons, owindow::con, current_match, DLOG, match_free(), match_init(), smalloc(), TAILQ_EMPTY, TAILQ_FIRST, TAILQ_FOREACH, TAILQ_INIT, TAILQ_INSERT_TAIL, and TAILQ_REMOVE.
typedef TAILQ_HEAD | ( | user_output_names_head, | |
user_output_name | ) |
Definition at line 1034 of file commands.c.
References user_output_name::name, output_primary_name(), outputs, xoutput::primary, scalloc(), sstrdup(), TAILQ_FOREACH, and TAILQ_INSERT_TAIL.
|
static |
Definition at line 1060 of file commands.c.
References get_output_from_string(), user_output_name::name, output_primary_name(), TAILQ_FOREACH, and TAILQ_NEXT.
Referenced by cmd_focus_output(), and cmd_move_con_to_output().
|
static |
Definition at line 1095 of file commands.c.
References user_output_name::name, TAILQ_EMPTY, TAILQ_FIRST, and TAILQ_REMOVE.
Referenced by cmd_focus_output(), and cmd_move_con_to_output().