5

I know that the i3 state is stored in a tree somewhere. Does anyone know how I could retrieve the state of my i3 environment to deal with as I wish?

5

i3 lets you see its internals at various levels and which level is useful to you depends on what you want to do with it.

To graphically view the tree, the i3 source code includes gtk-tree-watch, which displays the tree in a GTK window.

If you want to dump the layout to restore it later on, i3 allows saving and restoring layouts and the commands for that include one that will dump the layout, i3-save-tree.

If you want very detailed information about the tree, use the get_tree message from i3's IPC mechanism. You can do that for example with i3-msg:

i3-msg -t get_tree

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.