18 DLOG(
"Checking if any assignments match this window\n");
20 bool needs_tree_render =
false;
35 DLOG(
"This assignment already ran for the given window, not executing it again.\n");
51 DLOG(
"matching assignment, execute command %s\n", current->
dest.
command);
58 needs_tree_render =
true;
65 if (needs_tree_render) {
78 if ((type != A_ANY && (assignment->
type & type) == 0) ||
82 DLOG(
"got a matching assignment\n");
void run_assignments(i3Window *window)
Checks the list of assignments for the given window and runs all matching ones (unless they have alre...
Assignment * assignment_for(i3Window *window, int type)
Returns the first matching assignment for the given window.
CommandResult * parse_command(const char *input, yajl_gen gen, ipc_client *client)
Parses and executes the given command.
void command_result_free(CommandResult *result)
Frees a CommandResult.
bool match_matches_window(Match *match, i3Window *window)
Check if a match data structure matches the given window.
void tree_render(void)
Renders the tree, that is rendering all outputs using render_con() and pushing the changes to X11 usi...
struct assignments_head assignments
int sasprintf(char **strp, const char *fmt,...)
Safe-wrapper around asprintf which exits if it returns -1 (meaning that there is no more memory avail...
void * srealloc(void *ptr, size_t size)
Safe-wrapper around realloc which exits if realloc returns NULL (meaning that there is no more memory...
#define TAILQ_FOREACH(var, head, field)
A struct that contains useful information about the result of a command as a whole (e....
A 'Window' is a type which contains an xcb_window_t and all the related information (hints like _NET_...
Assignment ** ran_assignments
uint32_t nr_assignments
Pointers to the Assignments which were already ran for this Window (assignments run only once)
An Assignment makes specific windows go to a specific workspace/output or run a command for that wind...
Match match
the criteria to check if a window matches
union Assignment::@17 dest
destination workspace/command/output, depending on the type
enum Assignment::@16 type
type of this assignment: