Feature request: Allow WidthPercentage vavlue Always take effect in custom layout #80

Closed
opened 2026-01-05 14:48:10 +01:00 by adam · 5 comments
Owner

Originally created by @kls1991 on GitHub (Mar 5, 2022).

Originally assigned to: @LGUG2Z on GitHub.

Sorry for I'm not good at English, I'm not a programmer either...

I use a 24' moniter, I'm in love with custom layout. My primary windows is 75% width.

When there are 3 or more windows open, everything is fine. My primary window is big enough and other windows are waiting my call in a near position.

When there are 2 windows open, windows are equal width awkwardly. My browser is not wide enough... I kown it's meant to be like this to optimize for ultrawide screen, but can komorebi add a switch to allow widthPercentage vavlue always take effect even windows number is less or equal than custom layout colomn number?

That will be perfect for me, thanks!

Originally created by @kls1991 on GitHub (Mar 5, 2022). Originally assigned to: @LGUG2Z on GitHub. Sorry for I'm not good at English, I'm not a programmer either... I use a 24' moniter, I'm in love with custom layout. My primary windows is 75% width. When there are 3 or more windows open, everything is fine. My primary window is big enough and other windows are waiting my call in a near position. When there are 2 windows open, windows are equal width awkwardly. My browser is not wide enough... I kown it's meant to be like this to optimize for ultrawide screen, but can komorebi add a switch to allow widthPercentage vavlue always take effect even windows number is less or equal than custom layout colomn number? That will be perfect for me, thanks!
adam closed this issue 2026-01-05 14:48:10 +01:00
Author
Owner

@LGUG2Z commented on GitHub (Mar 28, 2022):

@kls1991 Check out the dynamic layout selection rules feature that I have just committed to the master branch. With this, you can specify another custom layout that you wish to apply when there are only two windows open, and with this you can specify the desired width of the primary column:

# layout-for-0-or-more-windows.yaml
- column: Primary
  configuration:
    WidthPercentage: 65
- column: Tertiary
  configuration: Horizontal

You can apply this rule with:

# 0 0 0 = monitor 0, workspace 0, when there are 0 or more windows visible
# you can change the first two arguments to your desired monitor and workspace index
komorebic workspace-custom-layout-rule 0 0 0 ~/layout-for-0-or-more-windows.yaml

Then, you can add one more rule to apply your existing custom layout when there are 3 or more windows open:

# 0 0 3 = monitor 0, workspace 0, when there are 3 or more windows visible
# you can change the first two arguments to your desired monitor and workspace index
komorebic workspace-custom-layout-rule 0 0 3 ~/your-existing-custom-layout.yaml
@LGUG2Z commented on GitHub (Mar 28, 2022): @kls1991 Check out the dynamic layout selection rules feature that I have just committed to the `master` branch. With this, you can specify another custom layout that you wish to apply when there are only two windows open, and with this you can specify the desired width of the primary column: ```yaml # layout-for-0-or-more-windows.yaml - column: Primary configuration: WidthPercentage: 65 - column: Tertiary configuration: Horizontal ``` You can apply this rule with: ```powershell # 0 0 0 = monitor 0, workspace 0, when there are 0 or more windows visible # you can change the first two arguments to your desired monitor and workspace index komorebic workspace-custom-layout-rule 0 0 0 ~/layout-for-0-or-more-windows.yaml ``` Then, you can add one more rule to apply your existing custom layout when there are 3 or more windows open: ```powershell # 0 0 3 = monitor 0, workspace 0, when there are 3 or more windows visible # you can change the first two arguments to your desired monitor and workspace index komorebic workspace-custom-layout-rule 0 0 3 ~/your-existing-custom-layout.yaml ```
Author
Owner

@LGUG2Z commented on GitHub (Mar 29, 2022):

@Cody-Duncan Maybe you would also like to try this out 🙏

@LGUG2Z commented on GitHub (Mar 29, 2022): @Cody-Duncan Maybe you would also like to try this out 🙏
Author
Owner

@kls1991 commented on GitHub (Mar 30, 2022):

Thank you man! I don't kown how to compile source code, will wait for a new release with ❤!

@kls1991 commented on GitHub (Mar 30, 2022): Thank you man! I don't kown how to compile source code, will wait for a new release with ❤!
Author
Owner

@LGUG2Z commented on GitHub (Mar 30, 2022):

There are still a few more issues I want to resolve before the next release, so it might be a little while before the new release is available on scoop, but if you already want to try this out you can download the exe files from the latest commit here and replace the current exe files on your system.

@LGUG2Z commented on GitHub (Mar 30, 2022): There are still a few more issues I want to resolve before the next release, so it might be a little while before the new release is available on scoop, but if you already want to try this out you can download the exe files from the latest commit [here](https://github.com/LGUG2Z/komorebi/actions/runs/2066586130) and replace the current exe files on your system.
Author
Owner

@calendulish commented on GitHub (Jun 29, 2022):

I'm trying to achieve same thing but it's not working. The layout doesn't apply when there's less than 3 window, even after komorebic workspace-custom-layout-rule 0 0 0 <layout> command

I'm using latest source code

@calendulish commented on GitHub (Jun 29, 2022): I'm trying to achieve same thing but it's not working. The layout doesn't apply when there's less than 3 window, even after ```komorebic workspace-custom-layout-rule 0 0 0 <layout>``` command I'm using latest source code
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#80