From fc67ff11c9cbd43733a45459308f9a969f3ca0b5 Mon Sep 17 00:00:00 2001 From: KeksNino Date: Wed, 8 Apr 2026 00:23:24 +0200 Subject: [PATCH] feat: add show widget to tray icon and show the gui on left click --- src/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.py b/src/main.py index b3e07a3..77436be 100644 --- a/src/main.py +++ b/src/main.py @@ -41,10 +41,16 @@ def run_gui(app): menu = QMenu() + show = QAction("Show") + show.triggered.connect(lambda: widget.show()) + menu.addAction(show) + quit = QAction("Quit") quit.triggered.connect(lambda: (closehelper(), force_exit())) menu.addAction(quit) + tray.activated.connect(lambda reason: widget.show() if reason == QSystemTrayIcon.ActivationReason.Trigger else None) + tray.setContextMenu(menu) # Check OS for window transparency compatibility and apply