[BUG]: 0.1.19 ahk generated library requires whkd arg for Stop command #261

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

Originally created by @BlueDrink9 on GitHub (Nov 12, 2023).

Describe the bug
Title should explain enough. Presumably ahk users shouldn't care about whkd.

Introduced by f4e0fb9

To Reproduce
Update komorebi and regenerate ahk lib

Expected behavior
Stop takes no arg (or maybe has an ahk default arg)

Originally created by @BlueDrink9 on GitHub (Nov 12, 2023). **Describe the bug** Title should explain enough. Presumably ahk users shouldn't care about whkd. Introduced by f4e0fb9 **To Reproduce** Update komorebi and regenerate ahk lib **Expected behavior** Stop takes no arg (or maybe has an ahk default arg)
adam added the bug label 2026-01-05 14:49:20 +01:00
adam closed this issue 2026-01-05 14:49:20 +01:00
Author
Owner

@LGUG2Z commented on GitHub (Nov 12, 2023):

The AHK library functions are autogenerated with the AhkFunction proc macro from the structs used to define which arguments commands can take.

If someone really wants to pick this up (or if they really love writing proc macros), they can add support for AHK optional arguments with defaults in the output generated by derive-ahk. I'm probably not gonna work on this though because this is honestly my least favourite part of the entire codebase/repo.

Given how difficult proc-macros are to work with, I'm also open to accepting "hacks" run on the post-proc-macro output (ie. immediately before the bytes are written) that can add defaults in this and other cases where it is appropriate.

@LGUG2Z commented on GitHub (Nov 12, 2023): The AHK library functions are [autogenerated with the `AhkFunction` proc macro](https://github.com/LGUG2Z/komorebi/blob/master/komorebic/src/main.rs#L633) from the structs used to define which arguments commands can take. If someone really wants to pick this up (or if they really love writing proc macros), they can add support for [AHK optional arguments with defaults](https://www.autohotkey.com/docs/v2/Functions.htm#optional) in the output generated by [derive-ahk](https://github.com/LGUG2Z/komorebi/tree/master/derive-ahk). I'm probably not gonna work on this though because this is honestly my least favourite part of the entire codebase/repo. Given how difficult proc-macros are to work with, I'm also open to accepting "hacks" run on the post-proc-macro output (ie. immediately before the bytes are written) that can add defaults in this and other cases where it is appropriate.
Author
Owner

@LGUG2Z commented on GitHub (Nov 13, 2023):

Figured it was best to do the hackery myself ;) This should be fixed now on master

@LGUG2Z commented on GitHub (Nov 13, 2023): Figured it was best to do the hackery myself ;) This should be fixed now on `master`
Author
Owner

@BlueDrink9 commented on GitHub (Nov 14, 2023):

While I'm here, was the 0.19 komorebic exe in the releases compiled at optimised level? I'm having massive performance issues with it. Using a terminal to send the commands, it takes almost a second to respond and change focus. If I replace it with the 0.18 exe I have no issues.

@BlueDrink9 commented on GitHub (Nov 14, 2023): While I'm here, was the 0.19 komorebic exe in the releases compiled at optimised level? I'm having massive performance issues with it. Using a terminal to send the commands, it takes almost a second to respond and change focus. If I replace it with the 0.18 exe I have no issues.
Author
Owner

@nascentt commented on GitHub (Nov 18, 2023):

While I'm here, was the 0.19 komorebic exe in the releases compiled at optimised level? I'm having massive performance issues with it. Using a terminal to send the commands, it takes almost a second to respond and change focus. If I replace it with the 0.18 exe I have no issues.

You might want to split off a separate issue for thay

@nascentt commented on GitHub (Nov 18, 2023): > While I'm here, was the 0.19 komorebic exe in the releases compiled at optimised level? I'm having massive performance issues with it. Using a terminal to send the commands, it takes almost a second to respond and change focus. If I replace it with the 0.18 exe I have no issues. You might want to split off a separate issue for thay
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#261