mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[BUG]: Custom layout column ordering #357
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tgrosinger on GitHub (Apr 28, 2024).
Describe the bug
If you place a primary column as the last column in a custom layout, komorebi fails to load.
For example, this custom layout will load:
But if we change the ordering of the last two columns:
It will no longer load.
Operating System
komorebic checkOutput@LGUG2Z commented on GitHub (Apr 28, 2024):
This is not a bug; this is part of the current design spec of custom layouts. Only a Tertiary column can occupy the rightmost position.
This feature doesn't really have an owner right now and honestly I regret implementing it. 😅
If anyone wants to work on a "Custom Layouts v2" with more flexibility in the design spec I am happy to mentor.
Some good places to start looking for anyone who is interested:
0b04e3ef93/komorebi-core/src/arrangement.rs (L198)0b04e3ef93/komorebi-core/src/custom_layout.rs (L108)@tgrosinger commented on GitHub (Apr 28, 2024):
Here's the layout that I am actually trying to achieve. Is there another way I can accomplish this that would be valid?
I tried putting the primary column first and then swapping, but it seems that
flip-layout horizontaldoes not work on custom layouts.I also tried using the
VerticalStacklayout, but it enforces that the primary is 50% width and you can't resize it.So many options that are so close, but haven't quite found one that gets me all the way there.
@LGUG2Z commented on GitHub (Apr 28, 2024):
You can get close with
VerticalStackflipped on the horizontal axis, but resize has not been implemented for this layout:0b04e3ef93/komorebi/src/workspace.rs (L894)This is also a good first issue to work on and you should be able to take some good inspiration from here:
0b04e3ef93/komorebi/src/workspace.rs (L930)@LGUG2Z commented on GitHub (Apr 28, 2024):
@tgrosinger I added a
RightMainVerticalStacklayout with resizing enabled here:383533e2d9@tgrosinger commented on GitHub (Apr 28, 2024):
Exciting, thank you! I'll give it a try soon.
I'd love to help with adding some features to this project, but I don't have the bandwidth to start learning Rust at the moment. Maybe some day though :)
@tgrosinger commented on GitHub (Apr 29, 2024):
This is perfect, thanks again.
@llinfeng commented on GitHub (Jul 10, 2024):
I was also looking for a
RightMain-type of layout, and arrived at the same bug with thecustom_layoutconfig, where keeping "Primary" to the far-right is treated as an invalid layout.For now,
RightMainVerticalStackworks great, as I can actually drag the main column and resize it as long as I don't move any other window around. When a window is moved to another monitor, the 50-50 split layout kicks back again.Question: how to let the adjusted width for
RightMainVerticalStackpersist? Does the workspace setting (where I specify the "layout" key) take some additional argument to indicate how wide the Primary column should be? I tried to play with theresize_dimensionskey, but didn't find a good way to load it properly.@bilogic commented on GitHub (Aug 10, 2025):
@LGUG2Z
How do we configure a persistent unequal split with
RightMainVerticalStack, e.g. 30-70?It is a pain to resize it all the time and a real strain on the neck to have it turned slightly left or right constantly
@bilogic commented on GitHub (Aug 10, 2025):
@llinfeng @LGUG2Z
I found
komorebic save-resize preferences.txtsaves my split andkomorebic load-resize preferences.txtloads itI wished this gets loaded by default