-
Notifications
You must be signed in to change notification settings - Fork 112
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
Feature: Add support for wm_name property when passing conditionals. #122
Comments
Almost, a year ago, I did a quick hack to support wm_name. Here is the patch:
|
@yoshinari-nomura, @rbreaves Give #129 a try and see if it works for you. |
@Lenbok This is awesome, I'll try and test it soon. I need to revise my fork a bit with the latest changes already. I think there are some old issues out there where I need to work on back porting some of my changes again but break it out into a different function so that it doesn't trip up some users existing keybinds. I need held key modifiers to be a thing on modifiers versus simply triggering a combo and immediately releasing the modifier even when it it is held, hence I need to create a KH() function and not just the default K(). That or add a paramter to K that would allow for held modifiers. |
@Lenbok Great! By the way, why don't you show the device_name as well?
|
Yes, that's a good idea. I was a little worried things would be getting too
verbose but really it would be useful for debugging. I will update the PR.
…On Fri, 9 Apr 2021, 17:52 Yoshinari Nomura, ***@***.***> wrote:
@Lenbok <https://github.com/Lenbok> Great!
I have tried your hack. It works for me perfectly. Thank you!
By the way, why don't you show the device_name as well?
something like in transform.py:
print("WM_CLASS '{}' WM_NAME '{}' DEVICE_NAME '{}' | active keymaps = [{}]".format(wm_class, wm_name, device_name, ", ".join(keymap_names)))
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#122 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACE34X75JRKUAOOFUAJ6RTTH2IYJANCNFSM4XXTAWAQ>
.
|
@Lenbok Thank you again! |
I've opened an issue against my fork to support |
Can we expand the conditions to not only check against wm_class, but to also optionally use wm_name? I think this change would allow for even more flexibility of allowing for varying keymaps based on where you are in an application and not only THE application you are in.
Examples where this could be useful would be Virtual Machines or Remote Desktops, you might want the wm_name instead of the class as that gives you additional context. Are you editing within the app or are you on a remote machine and want to completely exclude remaps - or do you want specific keymaps when accessing that device?
I believe this function, on_event, inside of transform.py will need some extensive changing and testing to allow for a second parameter to go along with wm_class and from reviewing the code wm_name appears to possibly act as a back up to wm_class? In either case I'd like to see its inclusion as a separate and valid parameter. I might get around to working on this in the future but for now I am just going to leave my thoughts here to get input from others or if someone thinks they'd like to tackle it then please do and I will happily try it out.
The text was updated successfully, but these errors were encountered: