I3: Unable to apply layout in i3 config folder

Created on 23 Jun 2015  ·  3Comments  ·  Source: i3/i3

Hi,

It appears that when applying a layout to workspace in i3 config folder, layout does not apply and shell returns an error :

{22:37}~/.i3:master ✗ ➭ i3-msg "workspace 10; append_layout workspace-10.json" 
ERROR: Your command: (null)
ERROR:               (null)
ERROR: Could not determine the contents of "workspace-10.json".
[{"success":true},{"success":false,"error":"Could not determine the contents of \"workspace-10.json\"."}]

If I go up it works fine :

{22:42}~/.i3:master ✗ ➭ cd ..
{22:42}~ ➭ i3-msg "workspace 10; append_layout .i3/workspace-10.json"
[{"success":true},{"success":true}]

If I go anywere :

{22:42}/etc ➭ i3-msg "workspace 10; append_layout /home/manu/.i3/workspace-10.json"
[{"success":true},{"success":true}]

i3 version

{22:45}~/.i3:master ✗ ➭ i3 -v
i3 version 4.10.2 (2015-04-16, branch "4.10.2") © 2009-2014 Michael Stapelberg and contributors

Log available here : http://logs.i3wm.org/logs/5663998322147328.bz2

4.10 bug missing-log

Most helpful comment

This has nothing to do with .i3/ being .i3/. This is simply because for the i3 process, your home directory is the working directory and hence the internal call to fopen with the "path" workspace-10.json will work if and only if the file is present in the working directory = home directory, but not anywhere else.

It will always work when specifying a full path. You can also use globbing, e.g., append_layout ~/.i3/workspace-10.json.

All 3 comments

I don’t see a link to logs.i3wm.org. Did you follow http://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

Oh,
It seems that execute same command in i3 config folder with full path runs fine

{22:43}~/.i3:master ✗ ➭ i3-msg "workspace 10; append_layout /home/manu/.i3/workspace-10.json"
[{"success":true},{"success":true}]

This has nothing to do with .i3/ being .i3/. This is simply because for the i3 process, your home directory is the working directory and hence the internal call to fopen with the "path" workspace-10.json will work if and only if the file is present in the working directory = home directory, but not anywhere else.

It will always work when specifying a full path. You can also use globbing, e.g., append_layout ~/.i3/workspace-10.json.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mybigman picture mybigman  ·  4Comments

xor512 picture xor512  ·  3Comments

sirlnx picture sirlnx  ·  4Comments

jchook picture jchook  ·  5Comments

ymolists picture ymolists  ·  4Comments