diff --git a/README.md b/README.md index 8291ea0..53b88a1 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Hit your **hotkey shortcut** -> speak -> hotk | -------------------------------- | ----------------------------------------------------------------------- | | **Whisper.cpp** backend | Local, offline, fast ASR. | | **Simulated typing** | instantly types straight into any currently focused input window. Even on Wayland! (*ydotool*). | -| **Clipboard** | Auto-copies into clipboard - ready for pasting, if desired | +| **Clipboard** | Optionally copies to clipboard (enabled by default) - ready for pasting, if desired | | **Languages** | 99+ languages. Provides default language config and session language override | | **AIPP**, AI Post-Processing | AI-rewriting via local or cloud LLMs. GUI prompt editor. | | **Multiple UI** surfaces | CLI, GUI (minimal PyQt6), TRAY (system tray), FLUX (triggered by voice activity detection, beta) | @@ -138,7 +138,7 @@ Leave VOXD running in the background -> go to any app where you want to voice-ty | Press hotkey … | VOXD does … | | ---------------- | ----------------------------------------------------------- | | **First press** | start recording | -| **Second press** | stop ⇢ [transcribe ⇢ copy to clipboard] ⇢ types the output into any focused app | +| **Second press** | stop ⇢ transcribe ⇢ types the output into any focused app (and copies to clipboard if enabled) | Otherwise, if in --flux (beta), **just speak**. diff --git a/src/voxd/core/config.py b/src/voxd/core/config.py index da32611..71e0112 100644 --- a/src/voxd/core/config.py +++ b/src/voxd/core/config.py @@ -21,6 +21,7 @@ "typing_start_delay": 0.15, "ctrl_v_paste": False, # Use Ctrl+V instead of default Ctrl+Shift+V "append_trailing_space": True, + "copy_to_clipboard": True, "verbosity": False, "autostart": False, "save_recordings": False, diff --git a/src/voxd/core/voxd_core.py b/src/voxd/core/voxd_core.py index cec78c1..fca3869 100644 --- a/src/voxd/core/voxd_core.py +++ b/src/voxd/core/voxd_core.py @@ -98,12 +98,13 @@ def run(self): except Exception: pass # logging failures should never crash the thread - # Copy to clipboard unless typing is enabled with paste mode (delay <= 0) - # to avoid double-copying to clipboard - typing_will_paste = (self.cfg.typing and + # Copy to clipboard if enabled, unless typing is enabled with paste mode + # (delay <= 0) to avoid double-copying to clipboard + typing_will_paste = (self.cfg.typing and self.cfg.typing_delay <= 0) - - if not typing_will_paste and final_text: + copy_enabled = self.cfg.data.get("copy_to_clipboard", True) + + if copy_enabled and not typing_will_paste and final_text: clipboard.copy(final_text) if self.cfg.typing and final_text: diff --git a/src/voxd/defaults/default_config.yaml b/src/voxd/defaults/default_config.yaml index 6e7a026..cb47813 100644 --- a/src/voxd/defaults/default_config.yaml +++ b/src/voxd/defaults/default_config.yaml @@ -7,6 +7,7 @@ typing_delay: 1 typing_start_delay: 0.15 ctrl_v_paste: false # Use Ctrl+V instead of default Ctrl+Shift+V append_trailing_space: true +copy_to_clipboard: true verbosity: false autostart: false record_chunked: true diff --git a/src/voxd/gui/settings_dialog.py b/src/voxd/gui/settings_dialog.py index c80ee22..b6d490f 100644 --- a/src/voxd/gui/settings_dialog.py +++ b/src/voxd/gui/settings_dialog.py @@ -78,6 +78,7 @@ def __init__(self, cfg: AppConfig, parent=None): self._add_doublespin(form, "typing_start_delay", "Start delay (s)", 0, 5, step=0.05) self._add_checkbox(form, "ctrl_v_paste", "Use Ctrl+V paste") self._add_checkbox(form, "append_trailing_space", "Add trailing space when typing") + self._add_checkbox(form, "copy_to_clipboard", "Copy transcription to clipboard") # ------------------------------------------------------------------ # Logging & Performance