Ship Superwhisper cloud dictation by default (#14625)
* Ship Superwhisper cloud dictation by default * Rely on Superwhisper cloud defaults without first-run setup
This commit is contained in:
1 parent
02d28d273a
commit
50d687a1f2
8 files changed
+13
-73
No files matched your search
@@ -68,8 +68,6 @@ run_first_run_step() {
|
||||
fi
|
||||
}
|
||||
|
||||
run_first_run_step "install Voxtype post-update hook" \
|
||||
omarchy-hook-install post-update "$OMARCHY_PATH/install/user/first-run/install-voxtype.hook"
|
||||
run_first_run_step "install fingerprint setup post-update hook" \
|
||||
omarchy-hook-install post-update "$OMARCHY_PATH/install/user/first-run/setup-fingerprint.hook"
|
||||
run_first_run_step "install agent setup post-update hook" \
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
superwhisper
|
||||
+2
-2
@@ -267,8 +267,8 @@ first runs `omarchy-provision-user || true` so finalize catches up if it
|
||||
never ran, then handles the steps that need a running graphical session
|
||||
and/or a working user systemd instance:
|
||||
|
||||
- `omarchy-hook-install post-update` for the three shipped hooks
|
||||
(`install-voxtype.hook`, `setup-fingerprint.hook`, `setup-agent.hook`).
|
||||
- `omarchy-hook-install post-update` for the two shipped hooks
|
||||
(`setup-fingerprint.hook`, `setup-agent.hook`).
|
||||
- `install/user/first-run/enable-user-units.sh` — daemon-reload, then
|
||||
`systemctl --user enable --now` the shipped user units (`bt-agent`,
|
||||
`omarchy-sleep-lock`, `omarchy-recover-internal-monitor`,
|
||||
|
||||
@@ -127,6 +127,7 @@ sddm
|
||||
slurp
|
||||
socat
|
||||
starship
|
||||
superwhisper-bin
|
||||
sushi
|
||||
system-config-printer
|
||||
tesseract
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if omarchy-done ensure voxtype-install-invitation; then
|
||||
omarchy-notification-send -u critical -g "Install Dictation" \
|
||||
"Click to install voice dictation for Omarchy." \
|
||||
--exec omarchy-menu summon setup.default.dictation
|
||||
fi
|
||||
@@ -10,11 +10,11 @@ This is very helpful for grabbing addresses out of image footers or phone number
|
||||
|
||||
### Dictation
|
||||
|
||||
Install [Voxtype](https://voxtype.io/) or [Superwhisper](https://superwhisper.com/) through _Setup > Defaults > Dictation_ in the Omarchy menu. Selecting a backend installs it if needed and makes it the default for dictation. Voxtype loads a base English model that takes up 150MB; change the model with `voxtype setup model` and other settings through `~/.config/voxtype/config.toml`. Superwhisper opens its settings to choose cloud or local processing, and OPR keeps the application updated.
|
||||
On fresh installs, [Superwhisper](https://superwhisper.com/) is the default dictation backend, using cloud processing without offline model downloads. Choose Superwhisper or [Voxtype](https://voxtype.io/) through _Setup > Defaults > Dictation_ in the Omarchy menu. Selecting a backend installs it if needed and makes it the default for dictation. Voxtype loads a base English model that takes up 150MB; change the model with `voxtype setup model` and other settings through `~/.config/voxtype/config.toml`. Superwhisper opens its settings to choose cloud or local processing, and OPR keeps the application updated.
|
||||
|
||||
Once installed, you dictate by holding down `Right Alt` or `F9`, or by toggling with `Super + Ctrl + X`, and the dictated text will appear in the focused input area. These shortcuts are enabled only after selecting a backend. Right Alt also starts dictation when used in a modifier chord; use Left Alt for those chords. On keyboard layouts where Right Alt is AltGr, use `F9` to keep AltGr available for typing.
|
||||
You dictate by holding down `Right Alt` or `F9`, or by toggling with `Super + Ctrl + X`, and the dictated text will appear in the focused input area. These shortcuts use the selected backend. Right Alt also starts dictation when used in a modifier chord; use Left Alt for those chords. On keyboard layouts where Right Alt is AltGr, use `F9` to keep AltGr available for typing.
|
||||
|
||||
The same shortcuts can use an installed Superwhisper instead. Select your backend through Setup > Defaults > Dictation. The backend installer configures it and saves the selection. Run `omarchy default dictation` to see which one is selected. The selection is saved in `~/.config/omarchy/defaults/dictation`. Dictation requires an explicit selection.
|
||||
The same shortcuts work with either backend. Select your backend through Setup > Defaults > Dictation. The backend installer configures it and saves the selection. Run `omarchy default dictation` to see which one is selected. The selection is saved in `~/.config/omarchy/defaults/dictation`. Fresh installs select Superwhisper automatically.
|
||||
|
||||
Omarchy loads the selected backend's desktop integration automatically. No Superwhisper configuration is needed in `~/.config/hypr/`.
|
||||
|
||||
|
||||
@@ -228,6 +228,12 @@ assert(#bindings == 5, "any configured backend receives the same bindings")
|
||||
LUA
|
||||
pass "dictation shortcuts require a selection without limiting backend names"
|
||||
|
||||
# Fresh users receive the backend choice through the settings package's skel.
|
||||
cp "$ROOT/config/omarchy/defaults/dictation" "$config"
|
||||
[[ $(omarchy-default-dictation) == "superwhisper" ]] || fail "fresh users default to Superwhisper"
|
||||
printf '%s\n' voxtype > "$config"
|
||||
pass "fresh users get Superwhisper as their default backend"
|
||||
|
||||
lua <<'LUA'
|
||||
local root = os.getenv("ROOT")
|
||||
package.path = root .. "/?.lua;" .. package.path
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname "$0")/base-test.sh"
|
||||
|
||||
test_home=$(mktemp -d)
|
||||
test_bin=$(mktemp -d)
|
||||
log_file=$(mktemp)
|
||||
hook_path="$test_home/.config/omarchy/hooks/post-update.d/install-voxtype.hook"
|
||||
|
||||
cleanup() {
|
||||
rm -rf "$test_home" "$test_bin"
|
||||
rm -f "$log_file"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
mkdir -p "$(dirname "$hook_path")"
|
||||
|
||||
cat >"$test_bin/omarchy-notification-send" <<'EOF'
|
||||
#!/bin/bash
|
||||
echo notification >>"$TEST_LOG"
|
||||
exec_args=()
|
||||
while (($# > 0)); do
|
||||
if [[ $1 == "--exec" ]]; then shift; exec_args=("$@"); break; fi
|
||||
shift
|
||||
done
|
||||
((${#exec_args[@]})) && echo "exec:${exec_args[*]}" >>"$TEST_LOG"
|
||||
EOF
|
||||
chmod +x "$test_bin/omarchy-notification-send"
|
||||
|
||||
# The shell runs the click command, so the invitation must not need a unit of its
|
||||
# own to keep a blocked sender alive until the toast is answered.
|
||||
cat >"$test_bin/systemd-run" <<'EOF'
|
||||
#!/bin/bash
|
||||
echo "systemd-run:$*" >>"$TEST_LOG"
|
||||
EOF
|
||||
chmod +x "$test_bin/systemd-run"
|
||||
|
||||
run_invitation_hook() {
|
||||
cp "$ROOT/install/user/first-run/install-voxtype.hook" "$hook_path"
|
||||
HOME="$test_home" PATH="$test_bin:$ROOT/bin:$PATH" TEST_LOG="$log_file" bash "$hook_path"
|
||||
}
|
||||
|
||||
run_invitation_hook
|
||||
|
||||
[[ -f $test_home/.local/state/omarchy/done/voxtype-install-invitation ]] || fail "Voxtype invitation records completion"
|
||||
[[ -f $hook_path ]] || fail "Voxtype invitation keeps its hook installed"
|
||||
[[ $(grep -c '^notification$' "$log_file") -eq 1 ]] || fail "Voxtype invitation sends one notification"
|
||||
grep -qx 'exec:omarchy-menu summon setup.default.dictation' "$log_file" ||
|
||||
fail "dictation invitation opens the backend installation choices"
|
||||
grep -q '^systemd-run:' "$log_file" && fail "Voxtype invitation needs no unit to hold an unanswered toast"
|
||||
|
||||
HOME="$test_home" PATH="$test_bin:$ROOT/bin:$PATH" TEST_LOG="$log_file" bash "$hook_path"
|
||||
|
||||
[[ -f $hook_path ]] || fail "completed Voxtype invitation keeps its hook installed"
|
||||
[[ $(grep -c '^notification$' "$log_file") -eq 1 ]] || fail "completed Voxtype invitation hook does not notify again"
|
||||
|
||||
pass "Voxtype invitation only runs once"
|
||||
Reference in new issue
Block a user