-
Notifications
You must be signed in to change notification settings - Fork 113
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Application-aware layer switching #40
Comments
Is tcp server needed? In linux xdotool can get the activewindow |
The TCP server is not necessary for this particular feature as you've shown. There can be workarounds that don't involve inter-process communication. However, the TCP server is nice to have for software integrations. |
For ease of discovery:
|
Just a thought. I have been using Espanso as a text expander and noticed they have application aware triggers. |
Yep, that's a good reference to use if one were to implement this in kanata. |
espanso offers similar features than autohotkey hotstrings, and similar to ahk hotstrings espanso won't work while kanata is running (at least on windows). But if we could tell espanso to listen to the kanata ouput instead of the real keyboard it should work? |
I quickly put together a rough draft.
Sends a request to change the layer to the current window name. Needs significant improvements, for example switch to the default layer, if current window is not in the list of application-specific layers. Here is the code: https://github.com/veyxov/qanata (sorry for the name 😅) Updates: |
Wow, would you believe that timing! I just finished my own daemon to interact with Kanata's TCP server. I guess it's pretty similar to kanawin with a few pros and cons. Cons
Pros
While it's still a work in progress, it's 100% working on my end. I'd love feedback if anyone gives it a try! |
I think it makes sense to convert this to a discussion instead of an open issue. With the TCP server it makes more sense to me to keep the functionality outside of kanata. I also now added links to the community projects |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
For Linux, can use https://github.com/k0kubun/xremap for inspiration.
For Windows: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getforegroundwindow
The text was updated successfully, but these errors were encountered: