Yabai: Deserialization Support / Defined Layouts

Created on 31 Jul 2019  路  6Comments  路  Source: koekeishiya/yabai

In chunkwm, I had serialized a few layouts and would de-serialize them with skhd.

Is a similar function supported in yabai?

If not, is there a standard way of achieving a desired layout?

This is an example of one of saved layouts:
Browser full length on the left, editor and terminal stacked on the right
Screen Shot 2019-07-31 at 3 42 53 PM

Most helpful comment

What's needed for both this and #184 is this:

  • parent-window / child-windows attributes in window queries so the tree can be traversed in the correct order
  • split-ratio attribute in window queries
  • a command for setting the split-ratio directly, e.g. yabai -m window [<sel>] split_ratio <value>

Edit:

@Kryan90 If not, is there a standard way of achieving a desired layout?

Easiest is to just resize the windows using the cursor. The splits will be adjusted accordingly.

All 6 comments

There is no layout serialization or deserialization system and I don't plan on implementing one. You could maybe do something using the signal system to automate your layout.

Ah, okay. I will read the signal docs and see if I can come up with a solution.

Thanks!

What's needed for both this and #184 is this:

  • parent-window / child-windows attributes in window queries so the tree can be traversed in the correct order
  • split-ratio attribute in window queries
  • a command for setting the split-ratio directly, e.g. yabai -m window [<sel>] split_ratio <value>

Edit:

@Kryan90 If not, is there a standard way of achieving a desired layout?

Easiest is to just resize the windows using the cursor. The splits will be adjusted accordingly.

I'm currently not interested in making the aforementioned changes.

Hello, in the process of migrating from chunkwm I noticed that this feature is missing, any particular reason? I find it extremely useful in some situations.

Would this be something you'd like to get contributed?

any particular reason?

I've opted not to implement it because the version in chunkwm feels like an incomplete solution as it is unable to track windows. I did experiment with that in chunkwm, but was not all that happy with that attempt, and I just haven't had the time to iterate on the problem yet.

I'm open to a contribution to such a system in general, but not if it is simply a copy of the existing version chunkwm had. I still think this can be solved in a much better way, given enough time spent.

Was this page helpful?
0 / 5 - 0 ratings