Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sitiom opened this issue Sep 7, 2023 · 3 comments
Closed

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

sitiom opened this issue Sep 7, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@sitiom
Copy link
Contributor

sitiom commented 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
@sitiom sitiom added the bug Something isn't working label Sep 7, 2023
@LGUG2Z
Copy link
Owner

LGUG2Z commented 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
Copy link
Owner

LGUG2Z commented 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
Copy link
Owner

LGUG2Z commented 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 LGUG2Z closed this as completed in 710a8d7 Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants