Originally created by @ItsPizzaTime1501 on GitHub (Sep 3, 2022).
Describe the bug
When using the ahk helper library generated by komorebic ahk-library you are required pass arguments that are meant to be optional
To Reproduce
A quick example of this is:
Add a line like ActiveWindowBorderColour(0, 255, 255) or FocusFollowsMouse("disable") to your config that includes the helper lib
Reload said config
You will get an error from autohotkey saying too few arguments passed
Expected behavior
You should be able to only pass the RGB values as the window-kind argument is optional in the command komorebic active-window-border-colour 0 255 255
Screenshots and Videos
The command failing
The same line working with the cli
Originally created by @ItsPizzaTime1501 on GitHub (Sep 3, 2022).
**Describe the bug**
When using the ahk helper library generated by `komorebic ahk-library` you are required pass arguments that are meant to be optional
**To Reproduce**
A quick example of this is:
1. Add a line like `ActiveWindowBorderColour(0, 255, 255)` or `FocusFollowsMouse("disable")` to your config that includes the helper lib
2. Reload said config
3. You will get an error from autohotkey saying too few arguments passed
**Expected behavior**
You should be able to only pass the RGB values as the window-kind argument is optional in the command `komorebic active-window-border-colour 0 255 255`
**Screenshots and Videos**

The command failing

The same line working with the cli
window-kind is actually a required argument, it's just that the CLI is able to provide a default value.
All of the AHK library is generated from the type annotations of the CLI, but it is possible to parse clap annotations and I think it could be possible to use this to provide a default argument to an AHK function if AHK supports default argument syntax for function definitions.
I'm not going to work on this issue myself, but I can provide guidance for anyone who would like to to try working on the derive-ahk proc macro which is a very self-contained part of the codebase.
@LGUG2Z commented on GitHub (Sep 4, 2022):
[`window-kind`](https://github.com/LGUG2Z/komorebi/blob/master/komorebic/src/main.rs#L408) is actually a required argument, it's just that the CLI is able to provide a default value.
All of the AHK library is generated from the type annotations of the CLI, but it is possible to [parse clap annotations](https://github.com/LGUG2Z/komorebi/blob/master/derive-ahk/src/lib.rs#L49) and I think it could be possible to use this to provide a default argument to an AHK function if AHK supports default argument syntax for function definitions.
I'm not going to work on this issue myself, but I can provide guidance for anyone who would like to to try working on the `derive-ahk` proc macro which is a very self-contained part of the codebase.
There won't be any more development on the ahk library generator; users will be encouraged to write their own wrappers going forward.
@LGUG2Z commented on GitHub (May 12, 2024):
There won't be any more development on the ahk library generator; users will be encouraged to write their own wrappers going forward.
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 @ItsPizzaTime1501 on GitHub (Sep 3, 2022).
Describe the bug
When using the ahk helper library generated by
komorebic ahk-libraryyou are required pass arguments that are meant to be optionalTo Reproduce
A quick example of this is:
ActiveWindowBorderColour(0, 255, 255)orFocusFollowsMouse("disable")to your config that includes the helper libExpected behavior
You should be able to only pass the RGB values as the window-kind argument is optional in the command
komorebic active-window-border-colour 0 255 255Screenshots and Videos


The command failing
The same line working with the cli
@LGUG2Z commented on GitHub (Sep 4, 2022):
window-kindis actually a required argument, it's just that the CLI is able to provide a default value.All of the AHK library is generated from the type annotations of the CLI, but it is possible to parse clap annotations and I think it could be possible to use this to provide a default argument to an AHK function if AHK supports default argument syntax for function definitions.
I'm not going to work on this issue myself, but I can provide guidance for anyone who would like to to try working on the
derive-ahkproc macro which is a very self-contained part of the codebase.@LGUG2Z commented on GitHub (May 12, 2024):
There won't be any more development on the ahk library generator; users will be encouraged to write their own wrappers going forward.