#!/usr/bin/env python3 # vim: set ts=4 sw=4 fileencoding=utf-8: # Luomio # Filename: dde-first-run.py # Create Date: 27-03, 13 import dbus def get_tray_window(): bus = dbus.SessionBus() traymanager = bus.get_object("com.deepin.dde.TrayManager", "/com/deepin/dde/TrayManager") traymanager_iface = dbus.Interface(traymanager, dbus_interface='org.freedesktop.DBus.Properties') windows = traymanager_iface.Get("com.deepin.dde.TrayManager","TrayIcons") str="window_id:" for i in range(len(windows)): str += '{:#x} '.format(windows[i]) print(str) if __name__ == "__main__": get_tray_window()