[BUG]: AHK config is not autoloaded if static config is passed #240

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

Originally created by @sitiom on GitHub (Sep 7, 2023).

Describe the bug

From the readme:

if you choose to use a static configuration file alongside AHK, you can remove all the configuration options from your komorebi.ahk and use it solely to handle hotkey bindings.

However, when trying this out, komorebi.ahk doesn't get loaded when I pass the static config file.

To Reproduce
Steps to reproduce the behavior:

  1. Create the static config (komorebi.json)
  2. Create the AHK config (komorebi.ahk)
  3. Run komorebic start -c komorebi.json

Expected behavior
The AHK config gets loaded alongside the static config, similar to how it works with whkd.

Operating System

OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22621 N/A Build 22621

komorebic check Output

No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\rycae

Looking for configuration files in C:\Users\rycae

Found komorebi.ahk; this file will be autoloaded by komorebi
Originally created by @sitiom on GitHub (Sep 7, 2023). **Describe the bug** From the readme: > if you choose to use a static configuration file alongside AHK, you can remove all the configuration options from your `komorebi.ahk` and use it solely to handle hotkey bindings. However, when trying this out, `komorebi.ahk` doesn't get loaded when I pass the static config file. **To Reproduce** Steps to reproduce the behavior: 1. Create the static config (`komorebi.json`) 2. Create the AHK config (`komorebi.ahk`) 3. Run `komorebic start -c komorebi.json` **Expected behavior** The AHK config gets loaded alongside the static config, similar to how it works with `whkd`. **Operating System** ``` OS Name: Microsoft Windows 11 Pro OS Version: 10.0.22621 N/A Build 22621 ``` **`komorebic check` Output** ``` No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\rycae Looking for configuration files in C:\Users\rycae Found komorebi.ahk; this file will be autoloaded by komorebi ```
adam added the bug label 2026-01-05 14:49:13 +01:00
adam closed this issue 2026-01-05 14:49:13 +01:00
Author
Owner

@LGUG2Z commented on GitHub (Sep 7, 2023):

I think this is going to be a new feature:

❯ komorebic start --help
Start komorebi.exe as a background process

Usage: komorebic.exe start [OPTIONS]

Options:
  -f, --ffm                  Allow the use of komorebi's custom focus-follows-mouse implementation
  -c, --config <CONFIG>      Path to a static configuration JSON file
  -a, --await-configuration  Wait for 'komorebic complete-configuration' to be sent before processing events
  -t, --tcp-port <TCP_PORT>  Start a TCP server on the given port to allow the direct sending of SocketMessages
      --whkd                 Start whkd in a background process
  -h, --help                 Print help

We should have an --ahk flag similar to the --whkd flag which tries to load the configuration. Hopefully I can find some time to look at this during September. 👌

@LGUG2Z commented on GitHub (Sep 7, 2023): I think this is going to be a new feature: ``` ❯ komorebic start --help Start komorebi.exe as a background process Usage: komorebic.exe start [OPTIONS] Options: -f, --ffm Allow the use of komorebi's custom focus-follows-mouse implementation -c, --config <CONFIG> Path to a static configuration JSON file -a, --await-configuration Wait for 'komorebic complete-configuration' to be sent before processing events -t, --tcp-port <TCP_PORT> Start a TCP server on the given port to allow the direct sending of SocketMessages --whkd Start whkd in a background process -h, --help Print help ``` We should have an `--ahk` flag similar to the `--whkd` flag which tries to load the configuration. Hopefully I can find some time to look at this during September. 👌
Author
Owner

@LGUG2Z commented on GitHub (Sep 7, 2023):

I think we should also clarify in the start help docs that --whkd and the future --ahk are only meaningful when used with --config

@LGUG2Z commented on GitHub (Sep 7, 2023): I think we should also clarify in the `start` help docs that `--whkd` and the future `--ahk` are only meaningful when used with `--config`
Author
Owner

@LGUG2Z commented on GitHub (Sep 7, 2023):

Also since there have historically been path lookup issues, this might be a good opportunity to also introduce something like --ahk-with-config where the user can specify the file they want to load; this should help with portability as well.

@LGUG2Z commented on GitHub (Sep 7, 2023): Also since there have historically been path lookup issues, this might be a good opportunity to also introduce something like `--ahk-with-config` where the user can specify the file they want to load; this should help with portability as well.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#240