Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

i3 won't load layout (parse error: client cancelled parse via callback return value) [closed]

Tags:

unix

archlinux

I saved the layout for my workspace and tried to load it following the docs:

i3-save-tree --workspace 1 >   /home/goldenoctopus/custom_system_files/workspace-1.json

and:

i3-msg "workspace 1; append_layout /home/goldenoctopus/custom_system_files/workspace-1.json"

But the command have no effect and just return the following error:

    ERROR: Your command: (null)
    ERROR:               (null)
    ERROR: parse error: client cancelled parse via callback return value
                                   }                             ]
                 (right here) ------^

    [{"success":true},{"success":false,"error":"parse error: client cancelled parse via callback return value\n                                        }                             ]\n                     (right here) ------^\n"}]
like image 999
GoldenOctopus Avatar asked Nov 24 '25 17:11

GoldenOctopus


1 Answers

There are three things to check and two things to check when you invoke i3-msg append_layout, since there seems to be a server bug here.

In the layout file:

  • Check there are no remaining comments (invalid JSON)
  • Check there are no commas next to any last element of a sequence (invalid JSON)
  • Check there are swallow criteria for the panes (required to set‑up the layout)

Point #2 means you have to check you do not left any extra comment when removing commented lines in the swallow criteria in an file generated by i3-save-tree.

Then, check you invoke i3-msg append_layout <path-to-file> either:

  • Using an absolute path for the layout file path
  • Invoke i3-msg append_layout <path-to-file> from your home directory

Note I got i3 crash box when loading some layout files, which suggest there are severe bug there (at least with i3 version 4.14).

like image 88
Hibou57 Avatar answered Nov 27 '25 23:11

Hibou57



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!