workspace-layout and workspace-layout-rule expect different naming schemes #105

Closed
opened 2026-01-05 14:48:21 +01:00 by adam · 1 comment
Owner

Originally created by @vbarrancos on GitHub (Jul 3, 2022).

Originally assigned to: @LGUG2Z on GitHub.

Hello!

While setting up Komorebi, I was trying to troubleshoot an issue where my simple layout rules weren't being applied. Pretty much just:

WorkspaceName(0, 0, "main")
WorkspaceLayoutRule(0, 0, 1, "bsp")
WorkspaceLayoutRule(0, 0, 4, "ultrawide-vertical-stack")

I was already successfully calling WorkspaceLayout(0, 1, "ultrawide-vertical-stack") for another workspace, so I couldn't figure out what I was doing wrong until I started manually feeding commands into my terminal one by one, at which point I noticed the following error.

PS> komorebic workspace-layout-rule 0 0 4 ultrawide-vertical-stack
error: Invalid value "ultrawide-vertical-stack" for '<LAYOUT>': Matching variant not found

I noticed that in default_layout.rs, layout names are set to be serialized using snake case, so I gave ultrawide_vertical_stack a shot and sure enough that worked. However, it does not work for workspace-layout, which seems to want kebab case...

PS> komorebic workspace-layout 0 0 ultrawide_vertical_stack
error: "ultrawide_vertical_stack" isn't a valid value for '<VALUE>'
        [possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack]

        Did you mean "ultrawide-vertical-stack"?

For more information try --help

My Rust-fu is woefully inadequate so I can't identify where this discrepancy is occurring. Both commands seem to accept a DefaultLayout as input, so I would expect them to use the same serialization strategy, be it ultrawide-vertical-stack or ultrawide_vertical_stack.

Originally created by @vbarrancos on GitHub (Jul 3, 2022). Originally assigned to: @LGUG2Z on GitHub. Hello! While setting up Komorebi, I was trying to troubleshoot an issue where my simple layout rules weren't being applied. Pretty much just: ```ahk WorkspaceName(0, 0, "main") WorkspaceLayoutRule(0, 0, 1, "bsp") WorkspaceLayoutRule(0, 0, 4, "ultrawide-vertical-stack") ``` I was already successfully calling `WorkspaceLayout(0, 1, "ultrawide-vertical-stack")` for another workspace, so I couldn't figure out what I was doing wrong until I started manually feeding commands into my terminal one by one, at which point I noticed the following error. ```powershell PS> komorebic workspace-layout-rule 0 0 4 ultrawide-vertical-stack error: Invalid value "ultrawide-vertical-stack" for '<LAYOUT>': Matching variant not found ``` I noticed that in [default_layout.rs](https://github.com/LGUG2Z/komorebi/blob/3eade94032d2cf189193999c2febeb6528a80ca8/komorebi-core/src/default_layout.rs#L13), layout names are set to be serialized using snake case, so I gave `ultrawide_vertical_stack` a shot and sure enough that worked. However, it does not work for `workspace-layout`, which seems to want kebab case... ```powershell PS> komorebic workspace-layout 0 0 ultrawide_vertical_stack error: "ultrawide_vertical_stack" isn't a valid value for '<VALUE>' [possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack] Did you mean "ultrawide-vertical-stack"? For more information try --help ``` My Rust-fu is woefully inadequate so I can't identify where this discrepancy is occurring. Both commands seem to accept a `DefaultLayout` as input, so I would expect them to use the same serialization strategy, be it `ultrawide-vertical-stack` or `ultrawide_vertical_stack`.
adam added the bug label 2026-01-05 14:48:21 +01:00
adam closed this issue 2026-01-05 14:48:21 +01:00
Author
Owner

@LGUG2Z commented on GitHub (Jul 3, 2022):

@vbarrancos Thanks for finding and reporting this so clearly! I have pushed tested and pushed a fix for this to the master branch. 🎉

@LGUG2Z commented on GitHub (Jul 3, 2022): @vbarrancos Thanks for finding and reporting this so clearly! I have pushed tested and pushed a fix for this to the master branch. 🎉
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#105