reidprichard / window_tools

Some simple tools to add lots of functionality to Kanata (and potentially other hotkey tools). This project is on hold for now, but after some life changes are complete I will pick this back up (est. June 2024).
GNU General Public License v3.0
13 stars 0 forks source link

a feedback #1

Open rszyma opened 9 months ago

rszyma commented 9 months ago
  1. Don't read layer names from config directly. Kanata configs can be multi-file (thanks to includes) and your tool will not work properly with these. It would be the best to obtain list of layer names from kanata TCP. There's no such feature in kanata TCP server right now though, so it would need to be implemented there first.

  2. 250 line buffer is definitely not enough (https://github.com/reidprichard/window_tools/blob/a7aaf9c69ba286e610f61ac7b2d25afd25d96eff/src/kanata_helper_daemon.c#L49). The default config that comes with kanata is 1000 lines long.

reidprichard commented 9 months ago

Helpful feedback, thank you!

I noted the limitations of parsing the config file in b28ee287543806caa6b6c3fea0b7a31832b292f7, and I bumped the max config line length to 1024 in ca5087c50f75f53deb53dd98613ff91ba27cf22a. However, note that this is the max line length, not the max number of lines.

I've also added a milestone to document these hardcoded limits in the readme.

rszyma commented 9 months ago

I noted the limitations of parsing the config file in b28ee28, and I bumped the max config line length to 1024 in ca5087c. However, note that this is the max line length, not the max number of lines.

My bad then!

Regarding my first point, I've just opened a PR in kanata to get layer names via TCP.

reidprichard commented 9 months ago

Excellent, thanks! I'll incorporate that here as soon as it goes through. Even for a single-file config that will be quite nice to not need to pass --path as an argument any more.