2 #define I3__FILE__ "assignments.c"
20 DLOG(
"Checking if any assignments match this window\n");
22 bool needs_tree_render =
false;
35 DLOG(
"This assignment already ran for the given window, not executing it again.\n");
43 DLOG(
"matching assignment, would do:\n");
44 if (current->
type == A_COMMAND) {
52 needs_tree_render =
true;
54 yajl_gen_free(command_output->
json_gen);
64 if (needs_tree_render)
76 if ((type != A_ANY && (assignment->
type & type) == 0) ||
Assignment ** ran_assignments
bool match_matches_window(Match *match, i3Window *window)
Check if a match data structure matches the given window.
An Assignment makes specific windows go to a specific workspace/output or run a command for that wind...
Assignment * assignment_for(i3Window *window, int type)
Returns the first matching assignment for the given window.
static struct CommandResult command_output
union Assignment::@17 dest
destination workspace/output/command, depending on the type
struct CommandResult * parse_command(const char *input)
A 'Window' is a type which contains an xcb_window_t and all the related information (hints like _NET_...
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)
void tree_render(void)
Renders the tree, that is rendering all outputs using render_con() and pushing the changes to X11 usi...
enum Assignment::@16 type
type of this assignment:
uint32_t nr_assignments
Pointers to the Assignments which were already ran for this Window (assignments run only once) ...
Match match
the criteria to check if a window matches
void run_assignments(i3Window *window)
Checks the list of assignments for the given window and runs all matching ones (unless they have alre...
struct assignments_head assignments