---------- From Ivan Kanakarakis 25-03-2012 at 15:20 ---------- > if you don't want to write something of your own, then > > $ xprop -root _NET_ACTIVE_WINDOW > > _NET_ACTIVE_WINDOW(WINDOW): window id # 0x400050
xprop -root shows me the values of the folowing fields: CUT_BUFFER0(STRING) WM_NAME(STRING) _NET_SUPPORTED(ATOM) ESETROOT_PMAP_ID(PIXMAP) _XROOTPMAP_ID(PIXMAP) RESOURCE_MANAGER(STRING) _XKB_RULES_NAMES(STRING) XFree86_VT(INTEGER) XFree86_DDC_EDID1_RAWDATA(INTEGER) > $ xdotool getactivewindow XGetWindowProperty[_NET_ACTIVE_WINDOW] failed (code=1) xdo_get_active_window reported an error > will work, as long as your wm supports and correctly sets _NET_ACTIVE_WINDOW I assume that this is not the case. I am using dwm. Does it matter? s.