deep-wine-runner/helper/get_tray_window
2024-01-21 21:45:18 +08:00

23 lines
655 B
Python
Executable File

#!/usr/bin/env python3
# vim: set ts=4 sw=4 fileencoding=utf-8:
# Luomio <nohappiness@gmail.com>
# 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()