fix(clipboard): copy to clipboard after IBus text injection (#311)

The IBus injection path had an early return that skipped the clipboard
copy logic. Store the result, copy to clipboard if enabled, then return.

Also add xclip and wl-clipboard to install.sh for all supported distros
so clipboard tools are available out of the box.
This commit is contained in:
Jatin K Malik
2026-03-14 13:37:04 -07:00
committed by GitHub
parent 18e9e0a966
commit e2fdf5ddf2
2 changed files with 16 additions and 10 deletions
@@ -442,7 +442,13 @@ class TextInjector:
or self.environment == DesktopEnvironment.X11_IBUS
):
if self._ibus_injector is not None:
return self._ibus_injector.inject_text(text)
result = self._ibus_injector.inject_text(text)
if result:
logger.info("Text injection completed successfully")
if self._should_copy_to_clipboard():
self._copy_to_clipboard(text)
logger.debug("Text also copied to clipboard (setting enabled)")
return result
else:
logger.error("IBus injector not initialized")
return False