i3
Data Structures | Macros | Typedefs | Functions
commands.c File Reference
#include <float.h>
#include <stdarg.h>
#include "all.h"
Include dependency graph for commands.c:

Go to the source code of this file.

Data Structures

struct  owindow
 

Macros

#define I3__FILE__   "commands.c"
 
#define y(x,...)   yajl_gen_ ## x (cmd_output->json_gen, ##__VA_ARGS__)
 
#define ystr(str)   yajl_gen_string(cmd_output->json_gen, (unsigned char*)str, strlen(str))
 
#define ysuccess(success)
 
#define HANDLE_EMPTY_MATCH
 When the command did not include match criteria (!), we use the currently focused container. More...
 

Typedefs

typedef struct owindow owindow
 

Functions

static bool definitelyGreaterThan (float a, float b, float epsilon)
 
static Outputget_output_from_string (Output *current_output, const char *output_str)
 
static bool maybe_back_and_forth (struct CommandResult *cmd_output, char *name)
 
static Conmaybe_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. More...
 
void cmd_criteria_add (I3_CMD, char *ctype, char *cvalue)
 Interprets a ctype=cvalue pair and adds it to the current match specification. More...
 
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'. More...
 
void cmd_move_con_to_workspace_back_and_forth (I3_CMD)
 Implementation of 'move [window|container] [to] workspace back_and_forth'. More...
 
void cmd_move_con_to_workspace_name (I3_CMD, char *name)
 Implementation of 'move [window|container] [to] workspace <name>'. More...
 
void cmd_move_con_to_workspace_number (I3_CMD, char *which)
 Implementation of 'move [window|container] [to] workspace number <number>'. More...
 
static void cmd_resize_floating (I3_CMD, char *way, char *direction, Con *floating_con, int px)
 
static bool cmd_resize_tiling_direction (I3_CMD, Con *current, char *way, char *direction, int ppt)
 
static bool cmd_resize_tiling_width_height (I3_CMD, Con *current, char *way, char *direction, int ppt)
 
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]'. More...
 
void cmd_border (I3_CMD, char *border_style_str, char *border_width)
 Implementation of 'border normal|none|1pixel|toggle'. More...
 
void cmd_nop (I3_CMD, char *comment)
 Implementation of 'nop <comment>'. More...
 
void cmd_append_layout (I3_CMD, char *path)
 Implementation of 'append_layout <path>'. More...
 
void cmd_workspace (I3_CMD, char *which)
 Implementation of 'workspace next|prev|next_on_output|prev_on_output'. More...
 
void cmd_workspace_number (I3_CMD, char *which)
 Implementation of 'workspace number <number>'. More...
 
void cmd_workspace_back_and_forth (I3_CMD)
 Implementation of 'workspace back_and_forth'. More...
 
void cmd_workspace_name (I3_CMD, char *name)
 Implementation of 'workspace <name>'. More...
 
void cmd_mark (I3_CMD, char *mark)
 Implementation of 'mark <mark>'. More...
 
void cmd_mode (I3_CMD, char *mode)
 Implementation of 'mode <string>'. More...
 
void cmd_move_con_to_output (I3_CMD, char *name)
 Implementation of 'move [window|container] [to] output <str>'. More...
 
void cmd_floating (I3_CMD, char *floating_mode)
 Implementation of 'floating enable|disable|toggle'. More...
 
void cmd_move_workspace_to_output (I3_CMD, char *name)
 Implementation of 'move workspace to [output] <str>'. More...
 
void cmd_split (I3_CMD, char *direction)
 Implementation of 'split v|h|vertical|horizontal'. More...
 
void cmd_kill (I3_CMD, char *kill_mode_str)
 Implementation of 'kill [window|client]'. More...
 
void cmd_exec (I3_CMD, char *nosn, char *command)
 Implementation of 'exec [–no-startup-id] <command>'. More...
 
void cmd_focus_direction (I3_CMD, char *direction)
 Implementation of 'focus left|right|up|down'. More...
 
void cmd_focus_window_mode (I3_CMD, char *window_mode)
 Implementation of 'focus tiling|floating|mode_toggle'. More...
 
void cmd_focus_level (I3_CMD, char *level)
 Implementation of 'focus parent|child'. More...
 
void cmd_focus (I3_CMD)
 Implementation of 'focus'. More...
 
void cmd_fullscreen (I3_CMD, char *fullscreen_mode)
 Implementation of 'fullscreen [global]'. More...
 
void cmd_move_direction (I3_CMD, char *direction, char *move_px)
 Implementation of 'move <direction> [<pixels> [px]]'. More...
 
void cmd_layout (I3_CMD, char *layout_str)
 Implementation of 'layout default|stacked|stacking|tabbed|splitv|splith'. More...
 
void cmd_layout_toggle (I3_CMD, char *toggle_mode)
 Implementation of 'layout toggle [all|split]'. More...
 
void cmd_exit (I3_CMD)
 Implementation of 'exit'. More...
 
void cmd_reload (I3_CMD)
 Implementation of 'reload'. More...
 
void cmd_restart (I3_CMD)
 Implementation of 'restart'. More...
 
void cmd_open (I3_CMD)
 Implementation of 'open'. More...
 
void cmd_focus_output (I3_CMD, char *name)
 Implementation of 'focus output <output>'. More...
 
void cmd_move_window_to_position (I3_CMD, char *method, char *cx, char *cy)
 Implementation of 'move [window|container] [to] [absolute] position <px> [px] <px> [px]. More...
 
void cmd_move_window_to_center (I3_CMD, char *method)
 Implementation of 'move [window|container] [to] [absolute] position center. More...
 
void cmd_move_scratchpad (I3_CMD)
 Implementation of 'move scratchpad'. More...
 
void cmd_scratchpad_show (I3_CMD)
 Implementation of 'scratchpad show'. More...
 
void cmd_rename_workspace (I3_CMD, char *old_name, char *new_name)
 Implementation of 'rename workspace <name> to <name>'. More...
 

Macro Definition Documentation

#define HANDLE_EMPTY_MATCH
Value:
do { \
owindow *ow = smalloc(sizeof(owindow)); \
ow->con = focused; \
TAILQ_INIT(&owindows); \
TAILQ_INSERT_TAIL(&owindows, ow, owindows); \
} \
} while (0)

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 32 of file commands.c.

Referenced by cmd_border(), cmd_floating(), cmd_focus_output(), cmd_fullscreen(), 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_scratchpad(), cmd_move_workspace_to_output(), and cmd_resize().

#define I3__FILE__   "commands.c"

Definition at line 2 of file commands.c.

#define y (   x,
  ... 
)    yajl_gen_ ## x (cmd_output->json_gen, ##__VA_ARGS__)
#define ystr (   str)    yajl_gen_string(cmd_output->json_gen, (unsigned char*)str, strlen(str))
#define ysuccess (   success)

Typedef Documentation

typedef struct owindow owindow

Function Documentation

void cmd_append_layout ( I3_CMD  ,
char *  path 
)

Implementation of 'append_layout <path>'.

Definition at line 871 of file commands.c.

References LOG, tree_append_json(), and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_border ( I3_CMD  ,
char *  border_style_str,
char *  border_width 
)

Implementation of 'border normal|none|1pixel|toggle'.

Definition at line 808 of file commands.c.

References Con::border_style, BS_NONE, BS_NORMAL, BS_PIXEL, owindow::con, con_set_border_style(), DLOG, ELOG, HANDLE_EMPTY_MATCH, Con::name, TAILQ_FOREACH, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_criteria_add ( I3_CMD  ,
char *  ctype,
char *  cvalue 
)

Interprets a ctype=cvalue pair and adds it to the current match specification.

Definition at line 308 of file commands.c.

References Match::class, Match::con_id, current_match, DLOG, ELOG, Match::id, Match::instance, Match::mark, regex_new(), Match::role, Match::title, and Match::urgent.

Referenced by GENERATED_call().

Here is the call graph for this function:

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 260 of file commands.c.

References owindow::con, Match::con_id, current_match, DLOG, Match::mark, Con::mark, match_matches_window(), Con::name, regex_matches(), TAILQ_END, TAILQ_FIRST, TAILQ_FOREACH, TAILQ_INIT, TAILQ_INSERT_TAIL, TAILQ_NEXT, and Con::window.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_exec ( I3_CMD  ,
char *  nosn,
char *  command 
)

Implementation of 'exec [–no-startup-id] <command>'.

Definition at line 1294 of file commands.c.

References DLOG, start_application(), and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_exit ( I3_CMD  )

Implementation of 'exit'.

Definition at line 1598 of file commands.c.

References conn, and LOG.

Referenced by GENERATED_call().

void cmd_floating ( I3_CMD  ,
char *  floating_mode 
)

Implementation of 'floating enable|disable|toggle'.

Definition at line 1089 of file commands.c.

References owindow::con, DLOG, floating_disable(), floating_enable(), HANDLE_EMPTY_MATCH, Con::name, TAILQ_FOREACH, toggle_floating_mode(), and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_focus ( I3_CMD  )

Implementation of 'focus'.

Definition at line 1392 of file commands.c.

References owindow::con, con_focus(), con_fullscreen_permits_focusing(), con_get_workspace(), current_match, DLOG, ELOG, focused, LOG, match_is_empty(), Con::name, scratchpad_show(), TAILQ_FOREACH, workspace_get(), workspace_show(), y, ystr, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_focus_direction ( I3_CMD  ,
char *  direction 
)

Implementation of 'focus left|right|up|down'.

Definition at line 1308 of file commands.c.

References DLOG, ELOG, HORIZ, tree_next(), VERT, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_focus_level ( I3_CMD  ,
char *  level 
)

Implementation of 'focus parent|child'.

Definition at line 1365 of file commands.c.

References con_fullscreen_permits_focusing(), DLOG, ELOG, focused, level_down(), level_up(), Con::parent, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_focus_output ( I3_CMD  ,
char *  name 
)

Implementation of 'focus output <output>'.

Definition at line 1659 of file commands.c.

References owindow::con, xoutput::con, DLOG, get_output_containing(), get_output_from_string(), GREP_FIRST, HANDLE_EMPTY_MATCH, LOG, Workspace_Assignment::output, output_get_content(), Con::rect, TAILQ_FOREACH, workspace_is_visible(), workspace_show(), Rect::x, Rect::y, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_focus_window_mode ( I3_CMD  ,
char *  window_mode 
)

Implementation of 'focus tiling|floating|mode_toggle'.

Definition at line 1334 of file commands.c.

References con_descend_focused(), con_focus(), con_get_workspace(), DLOG, focused, TAILQ_FIRST, TAILQ_FOREACH, Con::type, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_fullscreen ( I3_CMD  ,
char *  fullscreen_mode 
)

Implementation of 'fullscreen [global]'.

Definition at line 1472 of file commands.c.

References owindow::con, con_toggle_fullscreen(), DLOG, HANDLE_EMPTY_MATCH, Con::name, TAILQ_FOREACH, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_kill ( I3_CMD  ,
char *  kill_mode_str 
)

Implementation of 'kill [window|client]'.

Definition at line 1257 of file commands.c.

References owindow::con, current_match, DLOG, ELOG, KILL_CLIENT, KILL_WINDOW, match_is_empty(), Con::name, TAILQ_FOREACH, tree_close(), tree_close_con(), and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_layout ( I3_CMD  ,
char *  layout_str 
)

Implementation of 'layout default|stacked|stacking|tabbed|splitv|splith'.

Definition at line 1529 of file commands.c.

References owindow::con, con_set_layout(), current_match, DLOG, ELOG, focused, match_is_empty(), Con::name, TAILQ_FOREACH, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_layout_toggle ( I3_CMD  ,
char *  toggle_mode 
)

Implementation of 'layout toggle [all|split]'.

Definition at line 1571 of file commands.c.

References owindow::con, con_toggle_layout(), current_match, DLOG, focused, match_is_empty(), Con::name, TAILQ_FOREACH, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_mark ( I3_CMD  ,
char *  mark 
)

Implementation of 'mark <mark>'.

Definition at line 992 of file commands.c.

References all_cons, owindow::con, DLOG, FREE, HANDLE_EMPTY_MATCH, Con::mark, Con::name, sstrdup(), TAILQ_FOREACH, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_mode ( I3_CMD  ,
char *  mode 
)

Implementation of 'mode <string>'.

Definition at line 1020 of file commands.c.

References DLOG, switch_mode(), and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_move_con_to_output ( I3_CMD  ,
char *  name 
)

Implementation of 'move [window|container] [to] output <str>'.

Definition at line 1032 of file commands.c.

References owindow::con, xoutput::con, con_move_to_workspace(), D_DOWN, D_LEFT, D_RIGHT, D_UP, DLOG, get_output_by_name(), get_output_containing(), get_output_next_wrap(), GREP_FIRST, HANDLE_EMPTY_MATCH, LOG, Con::name, output_get_content(), Con::rect, TAILQ_FOREACH, workspace_is_visible(), Rect::x, Rect::y, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

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 at line 387 of file commands.c.

References owindow::con, con_get_workspace(), con_has_children(), con_move_to_workspace(), current_match, DLOG, ELOG, focused, HANDLE_EMPTY_MATCH, match_is_empty(), Con::name, TAILQ_EMPTY, TAILQ_FOREACH, Con::type, workspace_next(), workspace_next_on_output(), workspace_prev(), workspace_prev_on_output(), and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_move_con_to_workspace_back_and_forth ( I3_CMD  )

Implementation of 'move [window|container] [to] workspace back_and_forth'.

Definition at line 436 of file commands.c.

References owindow::con, con_move_to_workspace(), DLOG, HANDLE_EMPTY_MATCH, Con::name, TAILQ_FOREACH, workspace_back_and_forth_get(), y, ystr, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_move_con_to_workspace_name ( I3_CMD  ,
char *  name 
)

Implementation of 'move [window|container] [to] workspace <name>'.

Definition at line 468 of file commands.c.

References owindow::con, con_has_children(), con_move_to_workspace(), current_match, DLOG, ELOG, focused, HANDLE_EMPTY_MATCH, LOG, match_is_empty(), maybe_auto_back_and_forth_workspace(), Con::name, TAILQ_EMPTY, TAILQ_FOREACH, Con::type, workspace_get(), and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_move_con_to_workspace_number ( I3_CMD  ,
char *  which 
)

Implementation of 'move [window|container] [to] workspace number <number>'.

Definition at line 513 of file commands.c.

References owindow::con, con_has_children(), con_move_to_workspace(), croot, current_match, DLOG, focused, GREP_FIRST, HANDLE_EMPTY_MATCH, LOG, match_is_empty(), maybe_auto_back_and_forth_workspace(), Con::name, Con::num, output_get_content(), TAILQ_EMPTY, TAILQ_FOREACH, Con::type, workspace_get(), y, ystr, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_move_direction ( I3_CMD  ,
char *  direction,
char *  move_px 
)

Implementation of 'move <direction> [<pixels> [px]]'.

Definition at line 1494 of file commands.c.

References con_is_floating(), D_DOWN, D_LEFT, D_RIGHT, D_UP, DLOG, floating_reposition(), focused, Con::parent, Con::rect, tree_move(), Rect::x, Rect::y, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_move_scratchpad ( I3_CMD  )

Implementation of 'move scratchpad'.

Definition at line 1786 of file commands.c.

References owindow::con, DLOG, HANDLE_EMPTY_MATCH, Con::name, scratchpad_move(), TAILQ_FOREACH, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_move_window_to_center ( I3_CMD  ,
char *  method 
)

Implementation of 'move [window|container] [to] [absolute] position center.

Definition at line 1744 of file commands.c.

References con_get_workspace(), con_is_floating(), croot, DLOG, ELOG, floating_maybe_reassign_ws(), floating_reposition(), focused, Rect::height, Con::parent, Con::rect, Rect::width, Rect::x, y, Rect::y, ystr, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

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 at line 1701 of file commands.c.

References con_is_floating(), DLOG, ELOG, floating_maybe_reassign_ws(), floating_reposition(), focused, Con::parent, Con::rect, Rect::x, x, y, Rect::y, ystr, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_move_workspace_to_output ( I3_CMD  ,
char *  name 
)
void cmd_nop ( I3_CMD  ,
char *  comment 
)

Implementation of 'nop <comment>'.

Definition at line 861 of file commands.c.

References LOG.

Referenced by GENERATED_call().

void cmd_open ( I3_CMD  )

Implementation of 'open'.

Definition at line 1639 of file commands.c.

References owindow::con, con_focus(), Con::layout, LOG, tree_open_con(), y, and ystr.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_reload ( I3_CMD  )

Implementation of 'reload'.

Definition at line 1610 of file commands.c.

References command_error_nagbar_pid, config_error_nagbar_pid, conn, ipc_send_event(), kill_nagbar(), load_configuration(), LOG, x_set_i3_atoms(), and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_rename_workspace ( I3_CMD  ,
char *  old_name,
char *  new_name 
)

Implementation of 'rename workspace <name> to <name>'.

Definition at line 1828 of file commands.c.

References con_attach(), con_detach(), con_focus(), con_get_workspace(), croot, focused, FREE, GREP_FIRST, ipc_send_event(), LOG, Con::name, Con::num, Workspace_Assignment::output, output_get_content(), Con::parent, sstrdup(), TAILQ_FOREACH, y, ystr, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

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 at line 769 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, HANDLE_EMPTY_MATCH, TAILQ_FOREACH, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

static void cmd_resize_floating ( I3_CMD  ,
char *  way,
char *  direction,
Con floating_con,
int  px 
)
static

Definition at line 569 of file commands.c.

References floating_check_size(), Rect::height, LOG, Con::rect, Con::scratchpad_state, Rect::width, Rect::x, and Rect::y.

Referenced by cmd_resize().

Here is the call graph for this function:

static bool cmd_resize_tiling_direction ( I3_CMD  ,
Con current,
char *  way,
char *  direction,
int  ppt 
)
static

Definition at line 601 of file commands.c.

References con_num_children(), con_orientation(), definitelyGreaterThan(), HORIZ, Con::layout, LOG, Con::parent, Con::percent, TAILQ_END, TAILQ_NEXT, TAILQ_PREV, Con::type, VERT, and ysuccess.

Referenced by cmd_resize().

Here is the call graph for this function:

static bool cmd_resize_tiling_width_height ( I3_CMD  ,
Con current,
char *  way,
char *  direction,
int  ppt 
)
static

Definition at line 683 of file commands.c.

References con_num_children(), con_orientation(), definitelyGreaterThan(), HORIZ, Con::layout, LOG, Con::parent, Con::percent, TAILQ_FOREACH, Con::type, VERT, and ysuccess.

Referenced by cmd_resize().

Here is the call graph for this function:

void cmd_restart ( I3_CMD  )

Implementation of 'restart'.

Definition at line 1627 of file commands.c.

References i3_restart(), LOG, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_scratchpad_show ( I3_CMD  )

Implementation of 'scratchpad show'.

Definition at line 1806 of file commands.c.

References owindow::con, current_match, DLOG, match_is_empty(), Con::name, scratchpad_show(), TAILQ_FOREACH, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_split ( I3_CMD  ,
char *  direction 
)

Implementation of 'split v|h|vertical|horizontal'.

Definition at line 1235 of file commands.c.

References owindow::con, current_match, DLOG, focused, HORIZ, LOG, match_is_empty(), Con::name, TAILQ_FOREACH, tree_split(), VERT, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_workspace ( I3_CMD  ,
char *  which 
)

Implementation of 'workspace next|prev|next_on_output|prev_on_output'.

Definition at line 884 of file commands.c.

References DLOG, ELOG, workspace_next(), workspace_next_on_output(), workspace_prev(), workspace_prev_on_output(), workspace_show(), and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_workspace_back_and_forth ( I3_CMD  )

Implementation of 'workspace back_and_forth'.

Definition at line 959 of file commands.c.

References workspace_back_and_forth(), and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_workspace_name ( I3_CMD  ,
char *  name 
)

Implementation of 'workspace <name>'.

Definition at line 971 of file commands.c.

References DLOG, LOG, maybe_back_and_forth(), workspace_show_by_name(), and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

void cmd_workspace_number ( I3_CMD  ,
char *  which 
)

Implementation of 'workspace number <number>'.

Definition at line 914 of file commands.c.

References croot, GREP_FIRST, LOG, maybe_back_and_forth(), Con::name, Con::num, output_get_content(), TAILQ_FOREACH, workspace_show(), workspace_show_by_name(), y, ystr, and ysuccess.

Referenced by GENERATED_call().

Here is the call graph for this function:

static bool definitelyGreaterThan ( float  a,
float  b,
float  epsilon 
)
static

Definition at line 46 of file commands.c.

Referenced by cmd_resize_tiling_direction(), and cmd_resize_tiling_width_height().

static Output* get_output_from_string ( Output current_output,
const char *  output_str 
)
static

Definition at line 55 of file commands.c.

References D_DOWN, D_LEFT, D_RIGHT, D_UP, get_output_by_name(), and get_output_next_wrap().

Referenced by cmd_focus_output(), and cmd_move_workspace_to_output().

Here is the call graph for this function:

static Con* maybe_auto_back_and_forth_workspace ( Con workspace)
static

Definition at line 97 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_move_con_to_workspace_name(), and cmd_move_con_to_workspace_number().

Here is the call graph for this function:

static bool maybe_back_and_forth ( struct CommandResult cmd_output,
char *  name 
)
static
typedef TAILQ_HEAD (   owindows_head,
owindow   
)

Definition at line 226 of file commands.c.

References all_cons, owindow::con, current_match, DLOG, match_init(), smalloc(), TAILQ_EMPTY, TAILQ_FIRST, TAILQ_FOREACH, TAILQ_INIT, TAILQ_INSERT_TAIL, and TAILQ_REMOVE.

Here is the call graph for this function: