mirror of
https://github.com/prdlk/noctalia-ostt.git
synced 2026-08-02 17:41:38 +00:00
fix(monitor): resolve incorrect paste mode in notification key
This commit is contained in:
+8
-7
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user