fix(monitor): resolve incorrect paste mode in notification key

This commit is contained in:
Prad Nukala
2026-07-13 12:25:38 -04:00
parent 13fcc50f36
commit b69d0f8fd1
2 changed files with 9 additions and 8 deletions
+8 -7
View File
@@ -13,9 +13,10 @@
-- contract: SIGUSR1 finishes the recording and runs transcription (the same
-- mechanism `ostt launch` uses for hotkey toggling).
--
-- Output defaults to `ostt --paste`: the transcript is pasted straight into
-- the focused app. State/phase comes from the monitor service via
-- noctalia.state (see monitor.luau for the status/intent contract).
-- Output defaults to the clipboard (`ostt -c`); the settings can switch it to
-- `ostt --paste` (paste into the focused app — needs working wtype/ydotool key
-- injection). State/phase comes from the monitor service via noctalia.state
-- (see monitor.luau for the status/intent contract).
local function shq(s)
return "'" .. (s:gsub("'", "'\\''")) .. "'"
@@ -27,7 +28,7 @@ local osttRuntimeDir = runtime and (runtime .. "/ostt") or ("/tmp/ostt-" .. user
local pidFile = osttRuntimeDir .. "/recording.pid"
local exitFile = (runtime or "/tmp") .. "/noctalia-ostt-exit"
local outputMode = barWidget.getConfig("output_mode") or "paste"
local outputMode = barWidget.getConfig("output_mode") or "clipboard"
local model = barWidget.getConfig("model") or ""
local processAction = barWidget.getConfig("process_action") or ""
local showElapsed = barWidget.getConfig("show_elapsed")
@@ -90,10 +91,10 @@ end)
local function buildRecordCmd()
local parts = { "ostt", "record" }
if outputMode == "clipboard" then
parts[#parts + 1] = "-c"
else
if outputMode == "paste" then
parts[#parts + 1] = "--paste"
else
parts[#parts + 1] = "-c"
end
if model ~= "" then
parts[#parts + 1] = "-m " .. shq(model)