diff --git a/system_monitor.py b/system_monitor.py index d18d063..067ee39 100644 --- a/system_monitor.py +++ b/system_monitor.py @@ -280,7 +280,10 @@ def main(): ) app.icon = icon - def _tick(): + def _tick(icon_arg=None): + # pystray 会把 icon 作为参数传给 setup 回调 + if icon_arg is not None: + icon_arg.visible = True app.refresh() return True