fix(settings): disable copy-to-clipboard by default (#370)
Copy-to-clipboard is now opt-in. Users can enable it in Settings under Text Injection. This avoids unexpected clipboard overwrites on fresh installs and reduces background wl-copy/xclip timeout warnings on Wayland where clipboard access from daemon threads can be unreliable. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
co-authored by
Sisyphus
parent
80536c0fa4
commit
4d501f1711
@@ -384,10 +384,10 @@ class TextInjector:
|
||||
if os.path.exists(config_path):
|
||||
with open(config_path, "r") as f:
|
||||
config = json.load(f)
|
||||
return config.get("text_injection", {}).get("copy_to_clipboard", True)
|
||||
return config.get("text_injection", {}).get("copy_to_clipboard", False)
|
||||
except Exception as e:
|
||||
logger.debug(f"Could not read copy_to_clipboard setting: {e}")
|
||||
return True # Default to enabled
|
||||
return False
|
||||
|
||||
def _show_clipboard_fallback_notification(self):
|
||||
"""Show a desktop notification when text is copied to clipboard as fallback."""
|
||||
|
||||
@@ -50,7 +50,7 @@ DEFAULT_CONFIG = {
|
||||
"first_run": True,
|
||||
},
|
||||
"text_injection": {
|
||||
"copy_to_clipboard": True, # Always copy recognized text to clipboard
|
||||
"copy_to_clipboard": False, # Disabled by default; users can enable in Settings
|
||||
},
|
||||
"advanced": {
|
||||
"debug_logging": False,
|
||||
|
||||
@@ -1453,7 +1453,7 @@ class SettingsDialog(Gtk.Dialog):
|
||||
|
||||
autostart_enabled = general_settings.get("autostart", False)
|
||||
start_minimized = ui_settings.get("start_minimized", False)
|
||||
copy_to_clipboard = text_injection_settings.get("copy_to_clipboard", True)
|
||||
copy_to_clipboard = text_injection_settings.get("copy_to_clipboard", False)
|
||||
|
||||
self.autostart_switch.set_active(autostart_enabled)
|
||||
self.start_minimized_switch.set_active(start_minimized)
|
||||
|
||||
Reference in New Issue
Block a user