2 * vim:ts=4:sw=4:expandtab
4 * i3 - an improved dynamic tiling window manager
5 * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
7 * load_layout.c: Restore (parts of) the layout, for example after an inplace
16 // We could not determine the content of the JSON file. This typically
17 // means it’s unreadable or contains garbage.
18 JSON_CONTENT_UNKNOWN = 0,
20 // The JSON file contains a “normal” container, i.e. a container to be
21 // appended to an existing workspace (or split container!).
24 // The JSON file contains a workspace container, which needs to be appended
25 // to the output (next to the other workspaces) with special care to avoid
26 // naming conflicts and ensuring that the workspace _has_ a name.
27 JSON_CONTENT_WORKSPACE = 2,
30 /* Parses the given JSON file until it encounters the first “type” property to
31 * determine whether the file contains workspaces or regular containers, which
32 * is important to know when deciding where (and how) to append the contents.
34 json_content_t json_determine_content(const char *filename);
36 void tree_append_json(Con *con, const char *filename, char **errormsg);