* 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
38 lines
960 B
Bash
Executable File
38 lines
960 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Get or set the default dictation backend
|
|
# omarchy:args=[backend]
|
|
# omarchy:examples=omarchy default dictation | omarchy default dictation superwhisper
|
|
|
|
if (($# > 1)); then
|
|
echo "Usage: omarchy default dictation [backend]" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if (($# == 0)); then
|
|
config="${XDG_CONFIG_HOME:-$HOME/.config}/omarchy/defaults/dictation"
|
|
if [[ ! -s $config ]]; then
|
|
echo "No dictation backend configured. Select one in Setup > Defaults > Dictation." >&2
|
|
exit 1
|
|
fi
|
|
read -r backend < "$config"
|
|
else
|
|
backend=$1
|
|
fi
|
|
|
|
if [[ ! $backend =~ ^[a-z0-9][a-z0-9-]*$ ]]; then
|
|
echo "Invalid dictation backend: $backend" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if (($# == 0)); then
|
|
echo "$backend"
|
|
else
|
|
installer="omarchy-install-dictation-$backend"
|
|
if omarchy-cmd-missing "$installer"; then
|
|
echo "No installer available for dictation backend: $backend" >&2
|
|
exit 1
|
|
fi
|
|
omarchy-launch-floating-terminal-with-presentation "$installer"
|
|
fi
|