Add selectable Voxtype and Superwhisper dictation (#14552)
* Add selectable dictation backends * Move dictation migration after repository priority update * Extract backend-specific dictation installers * Keep dictation installer dispatcher executable * Call dictation backend installers directly * Drop legacy Superwhisper migration and runtime cleanup * Separate dictation defaults from generic recording protocol * Add backend-specific dictation removers * Preserve existing Voxtype selection during upgrade * Make dictation backend selection safe and retryable * Show the dictation indicator only for selected Voxtype * Allow switching away from stopped Superwhisper * Remove the built-in bar dictation indicator * Store default dictation selection under defaults * Rename dictation backend selector to use * Move dictation removers into their own menu category
This commit is contained in:
1 parent
1554a522cc
commit
c24889096e
34 files changed
+639
-141
No files matched your search
@@ -0,0 +1,9 @@
|
||||
if o.shell_succeeds("omarchy-default-dictation") then
|
||||
o.bind("SUPER + CTRL + X", "Toggle dictation", "omarchy-dictation toggle")
|
||||
o.bind("F9", "Start dictation (push-to-talk)", "omarchy-dictation start")
|
||||
o.bind("F9", "Stop dictation (push-to-talk)", "omarchy-dictation stop", { release = true })
|
||||
-- A modifier's mask changes between its press and release. Match the keysym
|
||||
-- independently of that mask; AltGr layouts use a different keysym.
|
||||
o.bind("ALT + Alt_R", "Start dictation (push-to-talk)", "omarchy-dictation start", { ignore_mods = true })
|
||||
o.bind("ALT + Alt_R", "Stop dictation (push-to-talk)", "omarchy-dictation stop", { release = true, ignore_mods = true })
|
||||
end
|
||||
@@ -1,5 +0,0 @@
|
||||
if o.cmd_present("voxtype") then
|
||||
o.bind("SUPER + CTRL + X", "Toggle dictation", "voxtype record toggle")
|
||||
o.bind("F9", "Start dictation (push-to-talk)", "voxtype record start")
|
||||
o.bind("F9", "Stop dictation (push-to-talk)", "voxtype record stop", { release = true })
|
||||
end
|
||||
@@ -0,0 +1,24 @@
|
||||
-- Backends may supply their own desktop integration without editing the
|
||||
-- user's Hyprland config. Recording bindings remain owned by Omarchy.
|
||||
local paths = require("default.hypr.paths")
|
||||
local pipe = io.popen("omarchy-default-dictation 2>/dev/null", "r")
|
||||
if not pipe then
|
||||
return
|
||||
end
|
||||
|
||||
local backend = pipe:read("*l")
|
||||
pipe:close()
|
||||
|
||||
if not backend or not backend:match("^[%w%-]+$") or o.cmd_missing("omarchy-dictation-" .. backend) then
|
||||
return
|
||||
end
|
||||
|
||||
local integration = paths.config_home .. "/" .. backend .. "/shortcuts.lua"
|
||||
local file = io.open(integration, "r")
|
||||
if file then
|
||||
file:close()
|
||||
local ok, error = pcall(dofile, integration)
|
||||
if not ok then
|
||||
print("Could not load dictation backend " .. backend .. ": " .. tostring(error))
|
||||
end
|
||||
end
|
||||
@@ -10,7 +10,7 @@ if _G.omarchy_default_bindings ~= false then
|
||||
require("default.hypr.bindings.clipboard")
|
||||
require("default.hypr.bindings.tiling")
|
||||
require("default.hypr.bindings.utilities")
|
||||
require("default.hypr.bindings.voxtype")
|
||||
require("default.hypr.bindings.dictation")
|
||||
require_optional.module("default.hypr.bindings.applications")
|
||||
end
|
||||
require("default.hypr.envs")
|
||||
@@ -18,6 +18,7 @@ require("default.hypr.looknfeel")
|
||||
require("default.hypr.qconsole")
|
||||
require("default.hypr.input")
|
||||
require("default.hypr.windows")
|
||||
require("default.hypr.dictation-backend")
|
||||
|
||||
-- Current theme overrides.
|
||||
require_optional.module("omarchy.current.theme.hyprland")
|
||||
Reference in new issue
Block a user