ooxcb.contrib.ewmh

This module contains some helper functions and methods dealing with the ewmh standard. They can also mixed into their corresponding classes.

ooxcb.contrib.ewmh.ewmh_get_client_list(screen)

return a list of ooxcb.protocol.xproto.Window instances, or None if the _NET_CLIENT_LIST property is not set.

ooxcb.contrib.ewmh.ewmh_get_client_list_stacking(screen)

return a list of ooxcb.protocol.xproto.Window instances, or None if the _NET_CLIENT_LIST_STACKING property is not set.

ooxcb.contrib.ewmh.ewmh_get_current_desktop(screen)

return the current desktop index (starting at 0), or None if the _NET_CURRENT_DESKTOP property is not set.

ooxcb.contrib.ewmh.ewmh_get_desktop(window)

return the desktop of the window or None if the _NET_WM_DESKTOP property is not set. 0xffffffff is returned if the window wants to be visible on all desktops (according to the ewmh spec)

ooxcb.contrib.ewmh.ewmh_get_number_of_desktops(screen)

return the number of desktops, or None if the property _NET_NUMBER_OF_DESKTOPS is not set.

ooxcb.contrib.ewmh.ewmh_get_window_name(window)

returns the window title you should use. Since it respects the icccm and the ewmh standard, it will use:

  • _NET_WM_VISIBLE_NAME if available. if not,
  • _NET_WM_NAME if available. if not,
  • WM_NAME

If WM_NAME is not available, it will return an empty string.

Note

WM_NAME’s encoding is latin-1, _NET_WM_NAME and _NET_WM_VISIBLE_NAME are utf-8-encoded.

ooxcb.contrib.ewmh.mixin()

mix em all