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");
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
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.
#define TAILQ_FOREACH(var, head, field)
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...
A struct that contains useful information about the result of a command as a whole (e....
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...
union Assignment::@222204053252343114274042165165310271133332337156 dest
destination workspace/command/output, depending on the type
Match match
the criteria to check if a window matches
enum Assignment::@362164307203113023013316042237071156073024074140 type
type of this assignment: