ℹ️ This is a machine-translated document. In case of discrepancies, refer to the original document.
CopyQ – User Interface & Integration in SL5 Aura¶
What is CopyQ?¶
CopyQ is an extensible clipboard manager with a scriptable interface. It saves a history of all copied content and allows access via command line, Python script or keyboard shortcut.
For SL5 Aura, CopyQ is the primary tool for speech-to-text results to the clipboard and manage it there.
Relevant files in the repo¶
File |
Purpose |
|---|---|
|
Exports FUZZY_MAP rules to CopyQ |
|
Processes text and sends it to CopyQ |
|
Numbers clipboard text by |
|
Test script for clipboard access |
|
Koan exercises on the topic |
export_to_copyq.py¶
The script tools/export_to_copyq.py reads the map files of the repo (read-only)
and sends the rules as structured items to CopyQ.
Important: The script does not change any files in the repo – it only sends commands to the external CopyQ process.
Platforms¶
Linux:
copyqis directly available in the PATHWindows: Typical paths are automatically searched, e.g.,
C:\Program Files\CopyQ\copyq.exe
Usage¶
python tools/export_to_copyq.py
Controlling CopyQ via command line¶
CopyQ has a built-in CLI:
# Aktuellen Clipboard-Inhalt zeigen
copyq read 0
# Text in Clipboard schreiben
copyq add "Mein Text"
# Item aus History holen (Index 0 = aktuell)
copyq read 0
# CopyQ-Fenster öffnen
copyq show
# Script ausführen
copyq eval "popup('Hallo von Aura!')"
Koan 11 – CopyQ User Interface¶
The Koan 11_copyq_benutzeroberflaeche contains rules that the word “koans”
recover from typical STT recognition errors.
FUZZY_MAP_pre.py (before LanguageTool)¶
FUZZY_MAP_pre = [
('koans', '^(korn|korns|koons|cohens|kreuz|kohl|kurz|chor ins|cuarn|twain|kurt)$'),
]
This rule applies in the case of full match (^...$) – thus stopping the further pipeline.
FUZZY_MAP.py (according to LanguageTool)¶
FUZZY_MAP = [
('koans', '(korn|korns|chor|chor ins|kohlen)'),
]
This rule also applies within a longer sentence (no full match).
Typical STT Errors with “CopyQ”¶
Vosk often recognizes “CopyQ” as:
copy cuekopie kucopy queuekopi q
Possible correction rule for FUZZY_MAP_pre.py:
('CopyQ', r'\b(copy\s*q(ue|ue?ue)?|kopi\s*q)\b', 0, {'command_flags': re.IGNORECASE}),
pyperclip as a Python alternative¶
If CopyQ is not available, Aura pyperclip is used as a fallback:
import pyperclip
pyperclip.copy("Text in Clipboard")
text = pyperclip.paste()
pyperclip is installed in .venv (site-packages/pyperclip/).
Notes¶
CopyQ must run as a background process for the CLI to work
On Linux:
copyq &at system startupOn Windows: CopyQ starts automatically in the tray when installed
For tests:
config/maps/plugins/z_fallback_llm/de-DE/test_clipboard.py