You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from ewmh import EWMH
ewmh = EWMH()
windows = ewmh.getClientList()
for w in windows:
# Window name (Title)
print(w.get_wm_name())
print(w.get_wm_class()[1])
I get:
Chromium
Google-chrome
Terminal
Xfce4-terminal
~/gits/test_ewmh/test.py (i3close) - Sublime Text
Sublime_text
While running: xprop | grep WM_NAME
Outputs:
WM_NAME(UTF8_STRING) = "New Issue · parkouss/pyewmh - Chromium"
_NET_WM_NAME(UTF8_STRING) = "New Issue · parkouss/pyewmh - Chromium"
and
WM_NAME(UTF8_STRING) = "duckduckgo at DuckDuckGo - Google Chrome"
_NET_WM_NAME(UTF8_STRING) = "duckduckgo at DuckDuckGo - Google Chrome"
I have tested this on a new pypenv with ewmh-0.1.6, python-xlib-0.23, six-1.11.0 and Python 3.6.5
I can't test this on others environments or browsers right now, but maybe I'm doing something wrong.
Did you have any idea or want more info?
The text was updated successfully, but these errors were encountered:
(Not involved in this project, just thought I'd comment) Though I can't speak to why get_wm_name() is empty (beyond the possibility that it may just be unset), if you didn't know already, in order to get _NET_WM_NAME (rather than _WM_NAME) you can use EWMH.getWmName, like:
fromewmhimportEWMHewmh=EWMH()
windows=ewmh.getClientList()
forwinwindows:
# Window name (Title)print(ewmh.getWmName(w))
print(w.get_wm_class()[1])
Just pure speculation, but I wonder if xprop would use _NET_WM_NAME as a fallback, given that - at least on my machine - WM_NAME is usually of type STRING, rather than UTF8_STRING
In any case, I believe the get_wm_name method is actually a method of python-xlib's Window (see here), so this problem may be entirely outside of pyewmh's control.
If I run this:
I get:
While running:
xprop | grep WM_NAME
Outputs:
and
I have tested this on a new pypenv with ewmh-0.1.6, python-xlib-0.23, six-1.11.0 and Python 3.6.5
I can't test this on others environments or browsers right now, but maybe I'm doing something wrong.
Did you have any idea or want more info?
The text was updated successfully, but these errors were encountered: