]> git.sur5r.net Git - i3/i3/commitdiff
parser: implement matching on the window id
authorMichael Stapelberg <michael@stapelberg.de>
Wed, 2 Jun 2010 15:20:32 +0000 (17:20 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 2 Jun 2010 15:20:32 +0000 (17:20 +0200)
src/cmdparse.y

index 51690a59e9b9588096ce5b1639626b3a3c2a6152..ab3dd4cc0e0ca89c304400256b637a87257b3902 100644 (file)
@@ -238,6 +238,13 @@ criteria:
         current_match.con_id = atoi($<string>3);
         printf("id as int = %d\n", current_match.con_id);
     }
+    | TOK_ID '=' STR
+    {
+        printf("criteria: window id = %s\n", $<string>3);
+        /* TODO: correctly parse number */
+        current_match.id = atoi($<string>3);
+        printf("window id as int = %d\n", current_match.id);
+    }
     ;
 
 operations: