2026-04-10 21:17:05 +02:00
|
|
|
"""Tray-Package — plattformspezifische Tray-App."""
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
from typing import Callable
|
|
|
|
|
|
|
|
|
|
from whisper_local.tray._tray import AppState, NoOpTray
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def create_tray(
|
|
|
|
|
on_settings: Callable[[], None],
|
|
|
|
|
on_quit: Callable[[], None],
|
2026-04-11 21:09:39 +02:00
|
|
|
) -> "PystrayApp | NoOpTray":
|
2026-04-10 21:17:05 +02:00
|
|
|
"""Gibt den plattformspezifischen Tray zurück."""
|
2026-04-11 21:30:19 +02:00
|
|
|
if sys.platform in ("win32", "linux"):
|
2026-04-11 21:09:39 +02:00
|
|
|
from whisper_local.tray._tray import PystrayApp
|
|
|
|
|
return PystrayApp(on_settings=on_settings, on_quit=on_quit)
|
2026-04-10 21:17:05 +02:00
|
|
|
return NoOpTray()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__all__ = ["create_tray", "AppState"]
|