DreadPirateLynx / input-remapper-xautopresets

Automatic input-remapper preset manager for systems with access to xdotool and xprop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xdotool: Unknown command: getwindowclass

UniqueName992 opened this issue · comments

Under Ubuntu 22.04 with xdotool version 3.20160805.1, xdotool does not have a getwindowclass option.

Running input-remapper-xautopresets getwindowinfo therefore doesn't provide the window class, instead producing the error xdotool: Unknown command: getwindowclassname and window name.

One fix could be to use xprop WM_CLASS instead.

In my testing I've not been able to change preset based on window title, which I assume is because the class isn't matching as the logs show empty classes for all windows.

Yeah, if the classes aren't matching, the window titles won't either (title matches depend on class names to allow for edge cases where two different programs share the matching portion of a window title). I'll look at fixing this later today. Out of curiosity, have you tried using a [GLOBAL:] .ini section to match an empty class for title matching? If that works, device specific ones should as well.

I have pushed an update that I believe will fix your problem. Please pull and install the update, and let me know how it goes

sorry, a minor typo made it into that first update; it should be working properly now

If I don't hear from you by the end of the day, I'll assume the issue is fixed for you and will close the issue.

Thanks for the fix - it's now showing class correctly I can observe in the logs and input-remapper-xautopresets getwindowinfo
I'm struggling to get the profiles to load still - not sure if it's a config issue. Changing the default profile to load isn't registering with the script.
In this example I'm trying to load 'presetnumber1' by default but the script isn't picking up the profile. My file tree looks like:
image
With the contents of the profile generated by input-remapper

Sorry - I'm honestly not sure on this one what it is

Could you please open this in a new issue, along with uploading the app and device logs?

Also: have you tried copy/pasting the filename from one place to the other? A number of times, a copy/paste has fixed a problem for me that wasn't visible.