Enhance Linux Wayland support and refine transcription logic

- Added instructions for Linux Wayland paste setup in README.md.
- Removed unnecessary JavaScript file and updated references in HTML files.
- Updated DefaultAIPrompt to clarify the role of the transcription tool.
- Removed overlay notifications for Linux to reduce desktop clutter.
- Implemented checks to ensure transcript integrity during refinement.
- Added tests to validate transcript preservation logic.
- Removed ydotool setup script as it is no longer needed.
This commit is contained in:
jahruz67
2026-05-20 17:08:01 -07:00
parent 9b08ed249a
commit 5fcef76424
13 changed files with 155 additions and 242 deletions
+15 -11
View File
@@ -19,28 +19,31 @@ import (
)
func (a *App) insertTranscription(text string) {
a.releaseLinuxInputFocus()
if isASCII(text) {
if err := typeLinuxTextWithYdotool(text); err == nil {
logger.Info("Typed transcription on Linux using ydotool (%d chars)", utf8.RuneCountInString(text))
return
} else {
logger.Error("Linux auto-type unavailable via ydotool: %v", err)
}
} else {
logger.Info("Skipping ydotool direct typing fallback for non-ASCII transcript")
}
if err := wailsruntime.ClipboardSetText(a.ctx, text); err != nil {
logger.Error("Failed to copy transcription to clipboard: %v", err)
} else {
waitForLinuxClipboardText(a.ctx, text)
a.releaseLinuxInputFocus()
if err := pasteLinuxClipboardWithYdotool(); err == nil {
logger.Info("Pasted transcription on Linux using ydotool (%d chars)", utf8.RuneCountInString(text))
logger.Info("Pasted transcription on Linux using clipboard + ydotool (%d chars)", utf8.RuneCountInString(text))
return
} else {
logger.Error("Linux auto-paste unavailable via ydotool: %v", err)
}
}
if !isASCII(text) {
logger.Info("Skipping ydotool direct typing fallback for non-ASCII transcript")
} else if err := typeLinuxTextWithYdotool(text); err == nil {
logger.Info("Typed transcription on Linux using ydotool (%d chars)", utf8.RuneCountInString(text))
return
} else {
logger.Error("Linux auto-type unavailable via ydotool: %v", err)
}
logger.Info("Copied transcription to clipboard; install ydotool with ydotoold/uinput access for automatic paste on GNOME Wayland")
if a.overlay != nil {
a.overlay.Show("Copied transcript. Press Ctrl+V to paste.")
@@ -122,6 +125,7 @@ func linuxYdotoolStatus() map[string]interface{} {
"echo 'KERNEL==\"uinput\", SUBSYSTEM==\"misc\", TAG+=\"uaccess\", OPTIONS+=\"static_node=uinput\"' | sudo tee /etc/udev/rules.d/80-uinput.rules",
"sudo udevadm control --reload-rules && sudo udevadm trigger",
"systemctl --user enable --now ydotool.service",
"# Restart your computer, then open WIS Free V3 again.",
},
}