WM_CLASS nunca está mudando. É sempre o mesmo.
Eu acho que você está tentando pegar o VISIBLE_NAME
.
Isso pode ser feito com xprop
:
xprop -spy -id 0x01a00092 _NET_WM_VISIBLE_NAME
_NET_WM_VISIBLE_NAME(UTF8_STRING) = "x11 - How can I monitor in real time the changes to the browsers WM_CLASS - Unix & Linux Stack Exchange ::: http://unix.stackexchange.com/questions/349872/how-can-i-monitor-in-real-time-the-changes-to-the-browsers-wm-class - Pale Moon"
_NET_WM_VISIBLE_NAME(UTF8_STRING) = "Newest Unanswered Questions - Unix & Linux Stack Exchange ::: http://unix.stackexchange.com/unanswered/tagged/?tab=newest - Pale Moon"
_NET_WM_VISIBLE_NAME(UTF8_STRING) = "x11 - How can I monitor in real time the changes to the browsers WM_CLASS - Unix & Linux Stack Exchange ::: http://unix.stackexchange.com/questions/349872/how-can-i-monitor-in-real-time-the-changes-to-the-browsers-wm-class - Pale Moon"
-id xxx
é o id da janela da janela de destino que você deseja monitorar.