]> git.sur5r.net Git - i3/i3/commitdiff
layout loading: allow comments in JSON files
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 14 Dec 2013 09:43:49 +0000 (10:43 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 22 Dec 2013 20:52:49 +0000 (21:52 +0100)
src/load_layout.c

index 0489c7f988e7693edd4419b762bb1cff5b8c0b5b..ce17f3a55700244c37c599945450f4ee7ffe4052 100644 (file)
@@ -396,6 +396,8 @@ void tree_append_json(const char *filename) {
     g = yajl_gen_alloc(NULL, NULL);
     hand = yajl_alloc(&callbacks, NULL, NULL, (void*)g);
 #endif
+    /* Allowing comments allows for more user-friendly layout files. */
+    yajl_config(hand, yajl_allow_comments, true);
     yajl_status stat;
     json_node = focused;
     to_focus = NULL;