-
Notifications
You must be signed in to change notification settings - Fork 125
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
Kanata native Windows GUI tray app #990
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR 🙂
f0d809c
to
e8d5c6e
Compare
If I want to add config support for icon names for each layer (instead of duplicating layer names at the top of What's the easiest way to update the config parser? I see there is |
I've meanwhile added a nice feature of changing icons on layer changes and a config option to allow setting icon per layer instead of per config and a config example with some icon files for illustration |
idea: maybe instead of introducing a whole special 3rd item for this, should maybe the name config be converted into a list and support additonal options besides its name?
Might be more flexible in case more per-layer options are needed later? What do you think? |
I like the idea. For backwards compatibility let's continue to accept an atom, and also accept a list. |
attach console if launched from console init logging to win debug str otherwise
need to move cli impl to lib as well so that it can be used in the gui impl gui impl needs to be in the lib so that it can use the llhook's GUI event loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nearly there, just needs some cleanup (and me reviewing AHK+gui code a bit more)
Incredible |
tried to build the gui feature, but it failed (Windows 10)
without interception_driver I can build but it won't run
|
this fixes the build issue, but won't work anyway since it seems that the interception variant is using its own loop instead of the NWG GUI event loop that llhook was using before I added actual gui app on top of that So not exactly sure how to marry those two loops.
Don't have interception driver installed due to its unfortunate catastrophic failure mode, so can't test properly |
Not sure about the other one, works for me™ from the current main branch also on Win10 with the same command, runs both from the terminal and on double-click (did you try double-click?). Could you try this #1051, it doesn't paper over the original error, so instead of |
Previous `.context` was hiding the errors during the gui building stage, leading to: #990 (comment) This fixes it and now it should bubble up the original error (anyhow's trait isn't implemented for NWG errors, so not sure you can conveniently chain both)
Thanks for the error message @rszyma |
kanata-tray.exe also has no pause - it has a start/stop toggel. I just called it pause. |
Allow renaming of `kanata.exe` gui app by omitting the name. Fixes one of #990 (comment)
Add Interception builds of the Windows GUI app Fixes the other part of #990 (comment)
Describe your changes. Use imperative present tense.
Add a
gui
feature allowing compiling kanata as a native tray-only Windows GUI application. This greatly simplifies launching the app on startup instead of resorting to hacks like this, gets rid of the console window and also allows UIAccess to work in elevated apps.There is a kanata-tray project which helps with the former, but doesn't allow UIAccess issue
It also supports custom icon indicator per config and per layer within the same config, as well as (re)loading configs. Other configs are passed as cli args in the
.lnk
fileIt also supports being launched from a console as a regular cli app, so it's possible to replace the main
kanata.exe
with this or let it be some separatekanata-tray.exe
fileIt also opens an avenue to more interesting ideas, but will add those in a separate issue #991
Checklist