trying to get WM_CLASS of active window to make AutoKey script for hotkey that works differently for different applications
here is one way to do it:
winname=`xdotool getactivewindow getwindowname`
winclass=`xprop -name "$winname" | grep WM_CLASS`
it works as desired when active window's title contains only ANSI characters. if there are other characters (like letters of non-latin alphabets) then xprop exits with error.
is there a way around this shortcoming of xprop?
or what are other ways to get WM_CLASS or otherwise identify active window's program name?