You are not logged in.

#1 2014-08-08 18:52:12

HiImTye
Member
From: Halifax, NS, Canada
Registered: 2012-05-09
Posts: 1,072

[SOLVED] set WM_CLASS property on windows without them

is it possible to set the WM_CLASS property for programs that don't set it on their own? I Googled and searched the Arch Forums but didn't have much luck (the Arch Forums gave me 569 pages of results, and no luck).
I'm using easystroke to set mouse events for certain Steam games, but a lot of them don't set a window class, and they end up sharing a profile (which also shares a profile for no window, and any other window without a class) which makes it really awkward to set up.

alternatively, is there a way to force easystroke to search by window title instead?

edit: I found the solution. it's to use xprop and

xprop -f WM_CLASS 8s -set WM_CLASS "FightTheDragon"

now I just need to figure out how to automate it
edit2: you can automate it by using the -name switch for xprop which uses the programs "WM_NAME" property to match, rather than cursor input

xprop -name "FightTheDragon" -f WM_CLASS 8s -set WM_CLASS "Fight"

Last edited by HiImTye (2014-08-08 19:10:26)

Offline

Board footer

Powered by FluxBB