mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[BUG]: komorebic stop --ahk doesn't stop autohotkey because of trailing space in command line
#543
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 @Ziron on GitHub (Dec 14, 2024).
Summary
Hello, when the AHK option is used and trying to stop the program, komorebi does not find the autohotkey process to stop it because there is a trailing space in the command line so the
($_.CommandLine -like '*komorebi.ahk"')condition does not match.Output when trying to stop the script:
Empty output of original command:
Output of modified command:
Command line as hex bytes to show the hidden trailing space (0x20):
Version Information
Komorebi Configuration
Hotkey Configuration
Output of komorebic check
@Ziron commented on GitHub (Dec 14, 2024):
Looks like it is known behavior that using
Start-Processadds an extra space at the end of the commandline: PowerShell/PowerShell#13094@LGUG2Z commented on GitHub (Dec 14, 2024):
Thanks for the deep dive here @Ziron! If someone would like to rewrite this logic in pure Rust to avoid the PowerShell issue I'd be willing to accept a patch.
@Dethada commented on GitHub (Feb 8, 2025):
I will be happy to take this up, I think we should handle all the process creation/deletion in rust directly through windows APIs, which would fix this issue and it should also reduce the start up time since we are removing the middleman which is powershell.
@LGUG2Z commented on GitHub (Feb 8, 2025):
This would be great - honestly I don't use the
startorstopcommands anymore and just manage all of these daemon-type processes with wpm instead. However I think that the time investment in learning how to use wpm, especially for people not already familiar with systemd, is way too high to make it a part of the "recommended" quickstart.@azinsharaf commented on GitHub (Oct 15, 2025):
@Dethada is this issue resolved with PR #1269? I still can't stop autohotkey process. #1103
@LGUG2Z commented on GitHub (Oct 17, 2025):
Closing issues related to launching AHK from
komorebicbecause this feature is now EOL, meaning no more work will be done on it and it will eventually be dropped during a major version bump