[BUG]: Komorobi is unable to load the static config #280

Closed
opened 2026-01-05 14:49:28 +01:00 by adam · 11 comments
Owner

Originally created by @claudio4 on GitHub (Jan 12, 2024).

Describe the bug
Komorobi refuses to load the static config file.
If komorebi is run without arguments it just ignores the config file, as if it does not exists. If I use the --config flag to force it to load the config file I get this error:

2024-01-12T21:35:32.715591Z  INFO komorebi: creating window manager from static configuration file: C:\Users\claudio4\AppData\Roaming\komorebi\komorebi.json
Error:
   0: The system cannot find the file specified. (os error 2)

Location:
   komorebi\src\static_config.rs:625

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: BaseThreadInitThunk<unknown>
      at <unknown source file>:<unknown line>
   2: RtlUserThreadStart<unknown>
      at <unknown source file>:<unknown line>

I AM sure that the file does indeed exists as I can cat it just fine.

To Reproduce
Steps to reproduce the behavior:

  1. Install Komorobi, either via winget or MSI. I have not tried scoop.
  2. (Optional) Set up a KOMOREBI_CONFIG_HOME.
  3. Start komorobi using komorebi --config "PATH\TO\komorebi.json" alternatvely using komorebic start --config "PATH\TO\komorebi.json" has the same effect, but it obscures the error message.
  4. See it crash.

Expected behavior
Komorobi should read the config file.

Operating System

OS Name:                   Microsoft Windows 11 Enterprise
OS Version:                10.0.22621 N/A Build 22621

komorebic check Output

KOMOREBI_CONFIG_HOME detected: C:\Users\claudio4\AppData\Roaming\komorebi

Looking for configuration files in C:\Users\claudio4\AppData\Roaming\komorebi

No komorebi configuration found in C:\Users\claudio4\AppData\Roaming\komorebi

If running 'komorebic start --await-configuration', you will manually have to call the following command to begin tiling: komorebic complete-configuration

Additional context
This happens with or without whkd or ahk installed. I have sucessfully replicated in a brand new Windows Sandbox (a.k.a a VM with my same version of Windows).
Probably related to #625, but that issue also talks about whkd, while this one is standalone to komorebi.

Originally created by @claudio4 on GitHub (Jan 12, 2024). **Describe the bug** Komorobi refuses to load the static config file. If komorebi is run without arguments it just ignores the config file, as if it does not exists. If I use the `--config` flag to force it to load the config file I get this error: ``` 2024-01-12T21:35:32.715591Z INFO komorebi: creating window manager from static configuration file: C:\Users\claudio4\AppData\Roaming\komorebi\komorebi.json Error: 0: The system cannot find the file specified. (os error 2) Location: komorebi\src\static_config.rs:625 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1: BaseThreadInitThunk<unknown> at <unknown source file>:<unknown line> 2: RtlUserThreadStart<unknown> at <unknown source file>:<unknown line> ``` I AM sure that the file does indeed exists as I can `cat` it just fine. **To Reproduce** Steps to reproduce the behavior: 1. Install Komorobi, either via winget or MSI. I have not tried scoop. 2. (Optional) Set up a `KOMOREBI_CONFIG_HOME`. 3. Start komorobi using `komorebi --config "PATH\TO\komorebi.json"` alternatvely using `komorebic start --config "PATH\TO\komorebi.json"` has the same effect, but it obscures the error message. 4. See it crash. **Expected behavior** Komorobi should read the config file. **Operating System** ``` OS Name: Microsoft Windows 11 Enterprise OS Version: 10.0.22621 N/A Build 22621 ``` **`komorebic check` Output** ``` KOMOREBI_CONFIG_HOME detected: C:\Users\claudio4\AppData\Roaming\komorebi Looking for configuration files in C:\Users\claudio4\AppData\Roaming\komorebi No komorebi configuration found in C:\Users\claudio4\AppData\Roaming\komorebi If running 'komorebic start --await-configuration', you will manually have to call the following command to begin tiling: komorebic complete-configuration ``` **Additional context** This happens with or without `whkd` or `ahk` installed. I have sucessfully replicated in a brand new Windows Sandbox (a.k.a a VM with my same version of Windows). Probably related to #625, but that issue also talks about whkd, while this one is standalone to komorebi.
adam added the bug label 2026-01-05 14:49:28 +01:00
adam closed this issue 2026-01-05 14:49:28 +01:00
Author
Owner

@azinsharaf commented on GitHub (Jan 13, 2024):

i agree that returning No komorebi configuration found in ... message is an issue. but beside that if you force to use it in -c it should pick it up.
i run it this way and it works:
komorebic start -c "$Env:USERPROFILE\.config\komorebi\komorebi.json" --whkd

as a side note, storing it in .config makes the dot files management easier. it is just a matter of personal preference.

@azinsharaf commented on GitHub (Jan 13, 2024): i agree that returning `No komorebi configuration found in ...` message is an issue. but beside that if you force to use it in `-c` it should pick it up. i run it this way and it works: `komorebic start -c "$Env:USERPROFILE\.config\komorebi\komorebi.json" --whkd` as a side note, storing it in .config makes the dot files management easier. it is just a matter of personal preference.
Author
Owner

@claudio4 commented on GitHub (Jan 13, 2024):

i agree that returning No komorebi configuration found in ... message is an issue. but beside that if you force to use it in -c it should pick it up.

It should but it does not.

i run it this way and it works:
komorebic start -c "$Env:USERPROFILE.config\komorebi\komorebi.json" --whkd

For me it produces this error:

~ ❯ komorebic start -c "$Env:USERPROFILE\.config\komorebi\komorebi.json"                                       13:31:36
Start-Process 'komorebi.exe' -ArgumentList '--config="C:\Users\claudio4\.config\komorebi\komorebi.json"' -WindowStyle hidden
Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again
Start-Process 'komorebi.exe' -ArgumentList '--config="C:\Users\claudio4\.config\komorebi\komorebi.json"' -WindowStyle hidden

Before runnig the command above I have moved my komorebi folder to .config to prove that it is not some appdata werideness.

@claudio4 commented on GitHub (Jan 13, 2024): > i agree that returning No komorebi configuration found in ... message is an issue. but beside that if you force to use it in -c it should pick it up. It should but it does not. > i run it this way and it works: komorebic start -c "$Env:USERPROFILE\.config\komorebi\komorebi.json" --whkd For me it produces this error: ``` ~ ❯ komorebic start -c "$Env:USERPROFILE\.config\komorebi\komorebi.json" 13:31:36 Start-Process 'komorebi.exe' -ArgumentList '--config="C:\Users\claudio4\.config\komorebi\komorebi.json"' -WindowStyle hidden Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again Start-Process 'komorebi.exe' -ArgumentList '--config="C:\Users\claudio4\.config\komorebi\komorebi.json"' -WindowStyle hidden ``` Before runnig the command above I have moved my komorebi folder to `.config` to prove that it is not some appdata werideness.
Author
Owner

@azinsharaf commented on GitHub (Jan 13, 2024):

can you post your json file?

@azinsharaf commented on GitHub (Jan 13, 2024): can you post your json file?
Author
Owner

@claudio4 commented on GitHub (Jan 13, 2024):

Yes, ofcourse,

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/master/schema.json",
  "app_specific_configuration_path": "C:\\Users\\claudio4\\AppData\\Roaming\\komorebi\\applications.yaml",
  "window_hiding_behaviour": "Cloak",
  "cross_monitor_move_behaviour": "Insert",
  "alt_focus_hack": true,
  "default_workspace_padding": 0,
  "default_container_padding": 0,
  "active_window_border": true,
  "active_window_border_colours": {
    "single": { "r": 66, "g": 165, "b": 245 },
    "stack": { "r": 256, "g": 165, "b": 66 },
    "monocle": { "r": 255, "g": 51, "b": 153 }
  },
  "monitors": [
    {
      "workspaces": [
        { "name": "I", "layout": "BSP" },
        { "name": "II", "layout": "VerticalStack" },
        { "name": "III", "layout": "HorizontalStack" },
        { "name": "IV", "layout": "UltrawideVerticalStack" },
        { "name": "V", "layout": "Rows" }
      ]
    }
  ]
}
@claudio4 commented on GitHub (Jan 13, 2024): Yes, ofcourse, ```json { "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/master/schema.json", "app_specific_configuration_path": "C:\\Users\\claudio4\\AppData\\Roaming\\komorebi\\applications.yaml", "window_hiding_behaviour": "Cloak", "cross_monitor_move_behaviour": "Insert", "alt_focus_hack": true, "default_workspace_padding": 0, "default_container_padding": 0, "active_window_border": true, "active_window_border_colours": { "single": { "r": 66, "g": 165, "b": 245 }, "stack": { "r": 256, "g": 165, "b": 66 }, "monocle": { "r": 255, "g": 51, "b": 153 } }, "monitors": [ { "workspaces": [ { "name": "I", "layout": "BSP" }, { "name": "II", "layout": "VerticalStack" }, { "name": "III", "layout": "HorizontalStack" }, { "name": "IV", "layout": "UltrawideVerticalStack" }, { "name": "V", "layout": "Rows" } ] } ] } ```
Author
Owner

@azinsharaf commented on GitHub (Jan 13, 2024):

the syntax and schema look correct. Do you have applications.yaml in the provided path?

@azinsharaf commented on GitHub (Jan 13, 2024): the syntax and schema look correct. Do you have `applications.yaml` in the provided path?
Author
Owner

@LGUG2Z commented on GitHub (Jan 13, 2024):

You need to use forward slashes in paths in the JSON files ^

@LGUG2Z commented on GitHub (Jan 13, 2024): You need to use forward slashes in paths in the JSON files ^
Author
Owner

@claudio4 commented on GitHub (Jan 13, 2024):

the syntax and schema look correct. Do you have applications.yaml in the provided path?

I was about to say yes, then double checked and... No 🤦. For whatever the reason (probably me being very dumb) my file was called applications.yml instead of applications.yaml. So yeah, that one is on me. I'm very sorry.

Nonetheless, I think that improving the error message for a missing applications.yaml could be a wise move to prevent more people f*nking up like I did.

@claudio4 commented on GitHub (Jan 13, 2024): > the syntax and schema look correct. Do you have `applications.yaml` in the provided path? I was about to say yes, then double checked and... No 🤦. For whatever the reason (probably me being very dumb) my file was called `applications.yml` instead of `applications.yaml`. So yeah, that one is on me. I'm very sorry. Nonetheless, I think that improving the error message for a missing applications.yaml could be a wise move to prevent more people f*nking up like I did.
Author
Owner

@azinsharaf commented on GitHub (Jan 14, 2024):

glad it works.
i agree that the messages contents can be improved.

@azinsharaf commented on GitHub (Jan 14, 2024): glad it works. i agree that the messages contents can be improved.
Author
Owner

@LGUG2Z commented on GitHub (Jan 15, 2024):

❯ komorebic check
KOMOREBI_CONFIG_HOME detected: C:\Users\LGUG2Z\.config\komorebi

Looking for configuration files in C:\Users\LGUG2Z\.config\komorebi

Found komorebi.json; this file can be passed to the start command with the --config flag

Application specific configuration file path 'C:/Users/LGUG2Z/.config/komorebi/applications.yml' does not exist. Try running 'komorebic fetch-asc'

Found ~/.config/whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag

I have updated the komorebic check command to validate the existence of the file - this will be part of the next release.

@LGUG2Z commented on GitHub (Jan 15, 2024): ``` ❯ komorebic check KOMOREBI_CONFIG_HOME detected: C:\Users\LGUG2Z\.config\komorebi Looking for configuration files in C:\Users\LGUG2Z\.config\komorebi Found komorebi.json; this file can be passed to the start command with the --config flag Application specific configuration file path 'C:/Users/LGUG2Z/.config/komorebi/applications.yml' does not exist. Try running 'komorebic fetch-asc' Found ~/.config/whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag ``` I have updated the `komorebic check` command to validate the existence of the file - this will be part of the next release.
Author
Owner

@goyalyashpal commented on GitHub (Jan 29, 2024):

Probably related to #625, but that issue also talks about whkd, while this one is standalone to komorebi.

hehe, i had no plan to use whkd, i faced that issue without whkd first, but as it's said that komorebi requires external thing to manage input etc, and it didn't seem working either. that's why i installed whkd as a fallback - "oh, i guess it requires that too to work"

@goyalyashpal commented on GitHub (Jan 29, 2024): > Probably related to #625, but that issue also talks about whkd, while this one is standalone to komorebi. hehe, i had no plan to use whkd, i faced that issue without whkd first, but as it's said that komorebi requires external thing to manage input etc, _and_ it didn't seem working either. that's why i installed whkd as a fallback - "oh, i guess it _requires_ that too to work"
Author
Owner

@goyalyashpal commented on GitHub (Apr 3, 2024):

this will be part of the next release.

it was this one right?

https://github.com/LGUG2Z/komorebi/releases/tag/v0.1.20

@goyalyashpal commented on GitHub (Apr 3, 2024): > this will be part of the next release. it was this one right? https://github.com/LGUG2Z/komorebi/releases/tag/v0.1.20
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#280