I'd like to set up a script that would launch an app (lets call it "Annoyance"
) and set WM_CLASS for it using xprop command.So it would be something like:
/pathtoannoyance & sleep 10s && xprop -name "window_name" -f WM_CLASS -set WM_CLASS "Annoyance"
The problem is that "window_name" varies, depending what file I open with Annoyance. So when I open file1 the title is "file1-Annoyance", when I open file2 it is "file2-Annoyance" and so on.
Thus I wonder whether it is possible to make xprop look only for the last letters in the window title?
But on the other hand that might cause other problems - if I open a couple of windows and if only the last letters will be used xprop won't know which windows needs to get a WM_CLASS assigned (thinking out loud...).
Any ideas on the solution?