Originally created by @melMass on GitHub (Mar 30, 2024).
Describe the bug
When using the --ahk flag of autostart I'm now getting this error
Tbh I'm not sure of what komorebi expects, I did copy the lib there to be sure too yet it still errors out
Expected behavior
A clearer error.
Screenshots and Videos
Operating System
Provide the output of systeminfo | grep "^OS Name\|^OS Version"
For example:
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.22000 N/A Build 22000
komorebic check Output
No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\User
Looking for configuration files in C:\Users\User
No komorebi configuration found in C:\Users\User
If running 'komorebic start --await-configuration', you will manually have to call the following command to begin tiling: komorebic complete-configuration
Originally created by @melMass on GitHub (Mar 30, 2024).
**Describe the bug**
When using the `--ahk` flag of autostart I'm now getting this error
Tbh I'm not sure of what komorebi expects, I did copy the lib there to be sure too yet it still errors out
**Expected behavior**
A clearer error.
**Screenshots and Videos**

**Operating System**
Provide the output of `systeminfo | grep "^OS Name\|^OS Version"`
For example:
```
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.22000 N/A Build 22000
```
**`komorebic check` Output**
```
No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\User
Looking for configuration files in C:\Users\User
No komorebi configuration found in C:\Users\User
If running 'komorebic start --await-configuration', you will manually have to call the following command to begin tiling: komorebic complete-configuration
```
**Additional Context**
The content of my AHK script:
```sh
#Requires AutoHotkey v2.0
#SingleInstance
#Include lib/komorebic.lib.ahk
;- KOMOREBIC
; Ctrl - ^
; Alt - !
; Shift - +
; Win - #
; AltFocusHack("enable")
; Focus windows
!h::Focus("left")
!j::Focus("down")
!k::Focus("up")
!l::Focus("right")
!+[::CycleFocus("previous")
!+]::CycleFocus("next")
!Enter::{
RunWait("C:/Users/User/.cargo/bin/alacritty.exe --working-directory C:/Users/User")
}
; Move windows
!Left::Move("left")
!Down::Move("down")
!Up::Move("up")
!Right::Move("right")
!+Enter::Promote()
; Stack windows
!+Left::Stack("left")
!+Right::Stack("right")
!+Up::Stack("up")
!+Down::Stack("down")
!u::Unstack()
![::CycleStack("previous")
!]::CycleStack("next")
; Resize
!NumpadAdd::ResizeAxis("vertical", "increase")
!NumpadSub::ResizeAxis("vertical", "decrease")
!NumpadMult::ResizeAxis("horizontal", "increase")
!NumpadDiv::ResizeAxis("horizontal", "decrease")
; Manipulate wineows
!t::ToggleFloat()
!+f::ToggleMonocle()
; Window manager options
!+r::Retile()
!p::TogglePause()
; Layouts
!x::FlipLayout("horizontal")
!y::FlipLayout("vertical")
!+l::CycleLayout("next")
; Workspaces
!&::{
FocusWorkspace(0)
}
!SC003::FocusWorkspace(1)
!SC004::FocusWorkspace(2)
!SC005::FocusWorkspace(3)
!SC006::FocusWorkspace(4)
!SC007::FocusWorkspace(5)
!SC008::FocusWorkspace(6)
!SC009::FocusWorkspace(7)
!SC00A::FocusWorkspace(8)
; Move windows across workspaces
!+1::MoveToWorkspace(0)
!+2::MoveToWorkspace(1)
!+3::MoveToWorkspace(2)
!+4::MoveToWorkspace(3)
!+5::MoveToWorkspace(4)
!+6::MoveToWorkspace(5)
!+7::MoveToWorkspace(6)
!+8::MoveToWorkspace(7)
!+9::MoveToWorkspace(8)
; Caps lock as Esc
Capslock::Esc
```
adam
added the bug label 2026-01-05 14:49:41 +01:00
I have this same issue, reported here. https://github.com/LGUG2Z/komorebi/issues/645
As a workaround, I added a link to the autohotkey script to the startup folder to start it independently.
Someone suggested making sure the executable name is autohotkey.exe, and that it's in your path environment variable. IDK, didn't fix it for me, I have ahk installed through scoop which puts everything in the path.
@jpmiller25 commented on GitHub (Apr 5, 2024):
I have this same issue, reported here. [https://github.com/LGUG2Z/komorebi/issues/645](https://github.com/LGUG2Z/komorebi/issues/645)
As a workaround, I added a link to the autohotkey script to the startup folder to start it independently.
Someone suggested making sure the executable name is autohotkey.exe, and that it's in your path environment variable. IDK, didn't fix it for me, I have ahk installed through scoop which puts everything in the path.
... which respects the custom config home env var, etc.
Maybe someone else can take a look and see if I'm missing something here?
@LGUG2Z commented on GitHub (Apr 6, 2024):
I'm not seeing anything obvious in the code that would cause this.
`start` tries to locate the ahk file using `HOME_DIR`:
https://github.com/LGUG2Z/komorebi/blob/5e714cafab61a5fd8a9bb11adf14504ffe609135/komorebic/src/main.rs#L1855
`HOME_DIR` respects the `KOMOREBI_CONFIG_HOME` environment variable:
https://github.com/LGUG2Z/komorebi/blob/5e714cafab61a5fd8a9bb11adf14504ffe609135/komorebic/src/main.rs#L62
`enable-autostart` constructs a shortcut file which calls the `start` command with the `--ahk` flag:
https://github.com/LGUG2Z/komorebi/blob/5e714cafab61a5fd8a9bb11adf14504ffe609135/komorebic/src/main.rs#L1302
... which respects the custom config home env var, etc.
Maybe someone else can take a look and see if I'm missing something here?
I also tried placing a shortcut to the autohotkey script, and adding a line in the autohotkey script that autostarts komorebi:
RunWait("komorebic.exe start", ,"Hide")
What I found was that komorebi did startup, but it did not use the komorebi.json or applications.yaml, so application windows weren't being placed correctly and configurations like window borders didn't display. and if I ran:
RunWait("komorebic.exe start --ahk", ,"Hide")
It would just give me an error saying komorebi.ahk not found
@Zerogaku commented on GitHub (Apr 8, 2024):
I also tried placing a shortcut to the autohotkey script, and adding a line in the autohotkey script that autostarts komorebi:
`RunWait("komorebic.exe start", ,"Hide")`
What I found was that komorebi did startup, but it did not use the komorebi.json or applications.yaml, so application windows weren't being placed correctly and configurations like window borders didn't display. and if I ran:
`RunWait("komorebic.exe start --ahk", ,"Hide")`
It would just give me an error saying komorebi.ahk not found
@stereotypicaldev commented on GitHub (Jun 17, 2024):
Same thing here, I second this issue, setting a custom config home, doesn't stop the client from looking at the wrong place, Either we have to find a way to specify where to look for the ahk script, or find a way to set an enviroment variable for Command Prompt.
@stereotypicaldev commented on GitHub (Jun 17, 2024):
Same thing here, I second this issue, setting a custom config home, doesn't stop the client from looking at the wrong place, Either we have to find a way to specify where to look for the ahk script, or find a way to set an enviroment variable for Command Prompt.
I also tried placing a shortcut to the autohotkey script, and adding a line in the autohotkey script that autostarts komorebi:
RunWait("komorebic.exe start", ,"Hide")
What I found was that komorebi did startup, but it did not use the komorebi.json or applications.yaml, so application windows weren't being placed correctly and configurations like window borders didn't display. and if I ran:
RunWait("komorebic.exe start --ahk", ,"Hide")
It would just give me an error saying komorebi.ahk not found
instead of
RunWait("komorebic.exe start", ,"Hide")
do
RunWait("komorebic.exe start", A_ScriptDir, "Hide")
to start the command in the current directory
@jklasdjklasdc commented on GitHub (Dec 7, 2024):
> I also tried placing a shortcut to the autohotkey script, and adding a line in the autohotkey script that autostarts komorebi:
>
> `RunWait("komorebic.exe start", ,"Hide")`
>
> What I found was that komorebi did startup, but it did not use the komorebi.json or applications.yaml, so application windows weren't being placed correctly and configurations like window borders didn't display. and if I ran:
>
> `RunWait("komorebic.exe start --ahk", ,"Hide")`
>
> It would just give me an error saying komorebi.ahk not found
instead of
RunWait("komorebic.exe start", ,"Hide")
do
RunWait("komorebic.exe start", A_ScriptDir, "Hide")
to start the command in the current directory
I'm having this issue even now. I copied the example config from the website, haven't modified it yet. I think I've done everything correctly...
C:\Users\User>komorebic start --ahk --masir
Error: could not find autohotkey, please make sure it is installed before using the --ahk flag
Location:
komorebic\src\main.rs:2036:17
C:\Users\User>
I have komorebi.ahk in C:\Users\User, I installed the latest version of AHK (2.0.18)
I ran komorebic.exe enable-autostart --masir --ahk and it didn't complain, but when I logged out and back in again, komorebi isn't running. I could use whkd but prefer AHK.
@alan12345678 commented on GitHub (Jan 12, 2025):
I'm having this issue even now. I copied the example config from the website, haven't modified it yet. I think I've done everything correctly...
```
C:\Users\User>komorebic start --ahk --masir
Error: could not find autohotkey, please make sure it is installed before using the --ahk flag
Location:
komorebic\src\main.rs:2036:17
C:\Users\User>
```
I have komorebi.ahk in C:\Users\User, I installed the latest version of AHK (2.0.18)
I ran `komorebic.exe enable-autostart --masir --ahk` and it didn't complain, but when I logged out and back in again, komorebi isn't running. I could use whkd but prefer AHK.
Ahk packaging is unfortunately very confusing and fragmented; from my side since the ability to specify a custom executable name is available, this is issue will be closed.
@LGUG2Z commented on GitHub (Jan 23, 2025):
Covered in the troubleshooting part of the doc site: https://lgug2z.github.io/komorebi/troubleshooting.html#autohotkey-executable-not-found
Ahk packaging is unfortunately very confusing and fragmented; from my side since the ability to specify a custom executable name is available, this is issue will be closed.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @melMass on GitHub (Mar 30, 2024).
Describe the bug
When using the
--ahkflag of autostart I'm now getting this errorTbh I'm not sure of what komorebi expects, I did copy the lib there to be sure too yet it still errors out
Expected behavior
A clearer error.
Screenshots and Videos

Operating System
Provide the output of
systeminfo | grep "^OS Name\|^OS Version"For example:
komorebic checkOutputAdditional Context
The content of my AHK script:
@jpmiller25 commented on GitHub (Apr 5, 2024):
I have this same issue, reported here. https://github.com/LGUG2Z/komorebi/issues/645
As a workaround, I added a link to the autohotkey script to the startup folder to start it independently.
Someone suggested making sure the executable name is autohotkey.exe, and that it's in your path environment variable. IDK, didn't fix it for me, I have ahk installed through scoop which puts everything in the path.
@LGUG2Z commented on GitHub (Apr 6, 2024):
I'm not seeing anything obvious in the code that would cause this.
starttries to locate the ahk file usingHOME_DIR:https://github.com/LGUG2Z/komorebi/blob/5e714cafab61a5fd8a9bb11adf14504ffe609135/komorebic/src/main.rs#L1855
HOME_DIRrespects theKOMOREBI_CONFIG_HOMEenvironment variable:https://github.com/LGUG2Z/komorebi/blob/5e714cafab61a5fd8a9bb11adf14504ffe609135/komorebic/src/main.rs#L62
enable-autostartconstructs a shortcut file which calls thestartcommand with the--ahkflag:https://github.com/LGUG2Z/komorebi/blob/5e714cafab61a5fd8a9bb11adf14504ffe609135/komorebic/src/main.rs#L1302
... which respects the custom config home env var, etc.
Maybe someone else can take a look and see if I'm missing something here?
@Zerogaku commented on GitHub (Apr 8, 2024):
I have the same problem, I manually compiled komorebi.
@Zerogaku commented on GitHub (Apr 8, 2024):
I also tried placing a shortcut to the autohotkey script, and adding a line in the autohotkey script that autostarts komorebi:
RunWait("komorebic.exe start", ,"Hide")What I found was that komorebi did startup, but it did not use the komorebi.json or applications.yaml, so application windows weren't being placed correctly and configurations like window borders didn't display. and if I ran:
RunWait("komorebic.exe start --ahk", ,"Hide")It would just give me an error saying komorebi.ahk not found
@stereotypicaldev commented on GitHub (Jun 17, 2024):
Same thing here, I second this issue, setting a custom config home, doesn't stop the client from looking at the wrong place, Either we have to find a way to specify where to look for the ahk script, or find a way to set an enviroment variable for Command Prompt.
@jklasdjklasdc commented on GitHub (Dec 7, 2024):
instead of
RunWait("komorebic.exe start", ,"Hide")
do
RunWait("komorebic.exe start", A_ScriptDir, "Hide")
to start the command in the current directory
@alan12345678 commented on GitHub (Jan 12, 2025):
I'm having this issue even now. I copied the example config from the website, haven't modified it yet. I think I've done everything correctly...
I have komorebi.ahk in C:\Users\User, I installed the latest version of AHK (2.0.18)
I ran
komorebic.exe enable-autostart --masir --ahkand it didn't complain, but when I logged out and back in again, komorebi isn't running. I could use whkd but prefer AHK.@LGUG2Z commented on GitHub (Jan 23, 2025):
Covered in the troubleshooting part of the doc site: https://lgug2z.github.io/komorebi/troubleshooting.html#autohotkey-executable-not-found
Ahk packaging is unfortunately very confusing and fragmented; from my side since the ability to specify a custom executable name is available, this is issue will be closed.