]> git.sur5r.net Git - i3/i3/blobdiff - src/cfgparse.y
Implement the window_role criterion (checks WM_WINDOW_ROLE)
[i3/i3] / src / cfgparse.y
index 57f943c8a26ad7d229843d57236701059cf1bed6..016953fd4c6f119f700a9dfab25cfacf0cdb43a1 100644 (file)
@@ -632,6 +632,7 @@ void parse_file(const char *f) {
 %token              TOK_MARK            "mark"
 %token              TOK_CLASS           "class"
 %token              TOK_INSTANCE        "instance"
+%token              TOK_WINDOW_ROLE     "window_role"
 %token              TOK_ID              "id"
 %token              TOK_CON_ID          "con_id"
 %token              TOK_TITLE           "title"
@@ -792,6 +793,12 @@ criterion:
         current_match.instance = regex_new($3);
         free($3);
     }
+    | TOK_WINDOW_ROLE '=' STR
+    {
+        printf("criteria: window_role = %s\n", $3);
+        current_match.role = regex_new($3);
+        free($3);
+    }
     | TOK_CON_ID '=' STR
     {
         printf("criteria: id = %s\n", $3);