]> git.sur5r.net Git - i3/i3/commitdiff
parser: implement "reload"
authorMichael Stapelberg <michael@stapelberg.de>
Wed, 30 Jun 2010 13:31:29 +0000 (15:31 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 30 Jun 2010 13:31:29 +0000 (15:31 +0200)
src/cmdparse.y

index 8190403f159a5e627064fe25b1006d857c6979cb..aa440046a7beb5b2d40eba85aa7a45db1a530aa2 100644 (file)
@@ -268,7 +268,8 @@ operation:
     exec
     | exit
     | restart
-    /*| reload
+    | reload
+    /*
     | mark
     | border */
     | layout
@@ -304,6 +305,16 @@ exit:
     }
     ;
 
+reload:
+    TOK_RELOAD
+    {
+        printf("reloading\n");
+        load_configuration(conn, NULL, true);
+        /* Send an IPC event just in case the ws names have changed */
+        ipc_send_event("workspace", I3_IPC_EVENT_WORKSPACE, "{\"change\":\"reload\"}");
+    }
+    ;
+
 restart:
     TOK_RESTART
     {