i3
Assignment Struct Reference

An Assignment makes specific windows go to a specific workspace/output or run a command for that window. More...

#include <data.h>

Collaboration diagram for Assignment:

Public Types

enum  {
  A_ANY = 0 , A_COMMAND = (1 << 0) , A_TO_WORKSPACE = (1 << 1) , A_NO_FOCUS = (1 << 2) ,
  A_TO_WORKSPACE_NUMBER = (1 << 3) , A_TO_OUTPUT = (1 << 4)
}
 type of this assignment: More...
 

Public Member Functions

 TAILQ_ENTRY (Assignment) assignments
 

Data Fields

enum Assignment:: { ... }  type
 type of this assignment:
 
Match match
 the criteria to check if a window matches
 
union { 
 
   char *   command 
 
   char *   workspace 
 
   char *   output 
 
dest 
 destination workspace/command/output, depending on the type
 

Detailed Description

An Assignment makes specific windows go to a specific workspace/output or run a command for that window.

With this mechanism, the user can – for example – assign their browser to workspace "www". Checking if a window is assigned works by comparing the Match data structure with the window (see match_matches_window()).

Definition at line 594 of file data.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

type of this assignment:

A_COMMAND = run the specified command for the matching window A_TO_WORKSPACE = assign the matching window to the specified workspace A_NO_FOCUS = don't focus matched window when it is managed

While the type is a bitmask, only one value can be set at a time. It is a bitmask to allow filtering for multiple types, for example in the assignment_for() function.

Enumerator
A_ANY 
A_COMMAND 
A_TO_WORKSPACE 
A_NO_FOCUS 
A_TO_WORKSPACE_NUMBER 
A_TO_OUTPUT 

Definition at line 606 of file data.h.

Member Function Documentation

◆ TAILQ_ENTRY()

Assignment::TAILQ_ENTRY ( Assignment )

Field Documentation

◆ command

char* Assignment::command

Definition at line 620 of file data.h.

Referenced by CFGFUN(), free_configuration(), and run_assignments().

◆ [union]

union { ... } Assignment::dest

destination workspace/command/output, depending on the type

Referenced by CFGFUN(), CFGFUN(), CFGFUN(), free_configuration(), manage_window(), and run_assignments().

◆ match

Match Assignment::match

the criteria to check if a window matches

Definition at line 616 of file data.h.

Referenced by assignment_for(), CFGFUN(), CFGFUN(), CFGFUN(), CFGFUN(), free_configuration(), and run_assignments().

◆ output

char* Assignment::output

Definition at line 622 of file data.h.

Referenced by CFGFUN(), free_configuration(), and manage_window().

◆ []

enum { ... } Assignment::type

type of this assignment:

A_COMMAND = run the specified command for the matching window A_TO_WORKSPACE = assign the matching window to the specified workspace A_NO_FOCUS = don't focus matched window when it is managed

While the type is a bitmask, only one value can be set at a time. It is a bitmask to allow filtering for multiple types, for example in the assignment_for() function.

Referenced by assignment_for(), CFGFUN(), CFGFUN(), CFGFUN(), CFGFUN(), free_configuration(), manage_window(), and run_assignments().

◆ workspace

char* Assignment::workspace

Definition at line 621 of file data.h.

Referenced by CFGFUN(), free_configuration(), and manage_window().


The documentation for this struct was generated from the following file: