]> git.sur5r.net Git - i3/i3/blobdiff - src/cmdparse.y
Re-implement the 'mode' command
[i3/i3] / src / cmdparse.y
index a540efed04099ebac6455a808af8b4cea7c77725..f86bead94c481c373c7c773056cec62f7084d7ef 100644 (file)
@@ -352,6 +352,7 @@ operation:
     | mark
     | resize
     | nop
+    | mode
     ;
 
 exec:
@@ -784,3 +785,10 @@ direction:
     | TOK_LEFT      { $$ = TOK_LEFT; }
     | TOK_RIGHT     { $$ = TOK_RIGHT; }
     ;
+
+mode:
+    TOK_MODE STR
+    {
+        switch_mode($2);
+    }
+    ;