MCPcopy Create free account
hub / github.com/CJackHwang/AIstudioProxyAPI / create_icon

Method create_icon

simple_launcher.py:228–239  ·  view source on GitHub ↗

Create tray icon - try AppIndicator3 first, then pystray

(self)

Source from the content-addressed store, hash-verified

226 self.backend = None # "appindicator" or "pystray"
227
228 def create_icon(self):
229 """Create tray icon - try AppIndicator3 first, then pystray"""
230
231 # 1. Try GNOME AppIndicator3 first (for Wayland)
232 if self._try_appindicator():
233 return
234
235 # 2. Then try pystray (for X11)
236 if self._try_pystray():
237 return
238
239 print("⚠️ System tray support not found. Tray disabled.")
240
241 def _try_appindicator(self) -> bool:
242 """Try to create tray with AppIndicator3"""

Callers 1

__init__Method · 0.45

Calls 2

_try_appindicatorMethod · 0.95
_try_pystrayMethod · 0.95

Tested by

no test coverage detected