]> git.sur5r.net Git - i3/i3/blobdiff - src/match.c
Introduce special value __focused__ for criterion con_id.
[i3/i3] / src / match.c
index 67054dae42960035d4e7b6e351d917b94bd3efed..8da3c1eaaa1cb05c1780ddc6a0b4b8dc3d5017ad 100644 (file)
@@ -279,6 +279,11 @@ void match_parse_property(Match *match, const char *ctype, const char *cvalue) {
     }
 
     if (strcmp(ctype, "con_id") == 0) {
+        if (strcmp(cvalue, "__focused__") == 0) {
+            match->con_id = focused;
+            return;
+        }
+
         char *end;
         long parsed = strtol(cvalue, &end, 10);
         if (parsed == LONG_MIN ||