refactor: convert inserter module to package with wayland backend
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
"""Text-Einfügung — plattformspezifische Backends hinter gemeinsamem Interface."""
|
||||
|
||||
import sys
|
||||
from typing import Protocol, runtime_checkable
|
||||
|
||||
|
||||
@runtime_checkable
|
||||
class Inserter(Protocol):
|
||||
async def insert(self, text: str) -> None: ...
|
||||
|
||||
|
||||
def create_inserter() -> Inserter:
|
||||
"""Erstellt den plattformspezifischen Inserter."""
|
||||
if sys.platform == "linux":
|
||||
from whisper_local.inserter._wayland import WaylandInserter
|
||||
return WaylandInserter()
|
||||
else:
|
||||
from whisper_local.inserter._win32 import Win32Inserter
|
||||
return Win32Inserter()
|
||||
Reference in New Issue
Block a user