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:
David Heinemeier Hansson authored and GitHub committed 2026-10-08 21:23:50 +02:00
1 parent 02d28d273a
commit 50d687a1f2
8 files changed
+13 -73

No files matched your search

+6
View File
@@ -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
-57
View File
@@ -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"