The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

I3-save-layout doesn't work as expected. Json file is empty!

asked Dec 13 '14

Unknownentity gravatar image

updated Dec 14 '14

Adaephon gravatar image

I'm using I3 4.8, have installed the perl modules AnyEvent::i3, JSON::XS and AnyEvent::Handle, along with i3-save-layout.

When I run the command

i3-save-tree --workspace 2: Ranger/NCMPCPP > .i3/ws2.2.json

the resulting file contains just one line:

// vim:ts=4:sw=4:et

When it should actually be containing the layout. Is this a bug, and why does it happen? Or is it something else, related to dependencies?

Would really appreciate some input on this. Seems to be a neat and useful feature.

1 answer

Sort by » oldest newest most voted
2

answered Dec 13 '14

xaos52 gravatar image

updated Dec 14 '14

Adaephon gravatar image

"2: Ranger/NCMPCPP" probably needs quoting, to make it a single argument. As it is the shell splits it into 2 arguments. (untested)

i3-save-tree --workspace '2: Ranger/NCMPCPP' > .i3/ws2.2.json

Comments

I feel like such an idiot. Never crossed my mind. Works perfectly. Thank you!

Unknownentity gravatar imageUnknownentity (Dec 15 '14)edit

Question Tools

Stats

Asked: Dec 13 '14

Seen: 434 times

Last updated: Dec 14 '14