Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix: detect active window class on Hyprland via hyprctl for correct terminal paste

Levi Minch643dde6ea752
diff --git a/src/helpers/clipboard.js b/src/helpers/clipboard.js
index c436d76f2..1022c0711 100644
--- a/src/helpers/clipboard.js
+++ b/src/helpers/clipboard.js
@@ -1099,6 +1099,19 @@ class ClipboardManager {
}
}
+ if (!detectedWindowClass) {
+ try {
+ const hyprResult = spawnSync("hyprctl", ["activewindow", "-j"]);
+ if (hyprResult.status === 0) {
+ const win = JSON.parse(hyprResult.stdout.toString());
+ detectedWindowClass = win.class?.toLowerCase() || null;
+ if (detectedWindowClass) {
+ debugLogger.debug("Hyprland window class detected", { detectedWindowClass }, "clipboard");
+ }
+ }
+ } catch {}
+ }
+
if (linuxFastPaste) {
const earlyIsTerminal = detectedWindowClass
? terminalClasses.some((t) => detectedWindowClass.includes(t))