4

I need to check how the browser's WM_NAME (let's say google-chrome) is changing in real time.

How can I do that ?

2
  • Could you explain in what setting you need ot? Mar 8 '17 at 6:13
  • I need this for i3wm since I suspect that initial title is different that actual one, so I can't use layout's "swallow" functionality properly. Mar 8 '17 at 8:36
3

WM_CLASS is never changing. It's always the same. I think you're trying to catch the VISIBLE_NAME.

That can be done with 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 is the window id of the target window you want to monitor.

1
  • How do I get the "id" of a window ? I need to start browser and immediately run the "monitor" command after that. Mar 8 '17 at 7:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.