mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[BUG]: AutoHotkey helper library requires optional arguments #137
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.