Load Voxtype hotkeys when installed
This commit is contained in:
@@ -20,7 +20,7 @@ if gum confirm "Install Voxtype + AI model (~150MB) to enable dictation?"; then
|
||||
fi
|
||||
voxtype setup systemd
|
||||
|
||||
omarchy-hyprland-toggle voxtype on
|
||||
hyprctl reload >/dev/null
|
||||
omarchy-restart-shell
|
||||
omarchy-notification-send -g "Voxtype Dictation Ready" "Hold F9 to dictate (or toggle with Super + Ctrl + X)." -t 10000
|
||||
fi
|
||||
|
||||
@@ -18,7 +18,7 @@ if omarchy-cmd-present voxtype; then
|
||||
omarchy-pkg-drop voxtype-bin
|
||||
rm -rf ~/.config/voxtype
|
||||
rm -rf ~/.local/share/voxtype
|
||||
omarchy-hyprland-toggle voxtype off
|
||||
hyprctl reload >/dev/null
|
||||
else
|
||||
echo "Voxtype was not installed."
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
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
|
||||
@@ -10,6 +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_optional.module("default.hypr.bindings.applications")
|
||||
end
|
||||
require("default.hypr.envs")
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
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 })
|
||||
@@ -0,0 +1,4 @@
|
||||
echo "Remove the obsolete Voxtype Hyprland toggle"
|
||||
|
||||
rm -f "$HOME/.local/state/omarchy/toggles/hypr/voxtype.lua"
|
||||
hyprctl reload >/dev/null 2>&1 || true
|
||||
@@ -130,6 +130,26 @@ no_bindings_output=$(run_omarchy_bindings "$no_bindings_home" 'omarchy_default_b
|
||||
[[ -z $no_bindings_output ]] || fail "default binding variable disables all Omarchy bindings" "$no_bindings_output"
|
||||
pass "default binding variable disables all Omarchy bindings"
|
||||
|
||||
voxtype_home="$tmpdir/voxtype-home"
|
||||
voxtype_bin="$tmpdir/voxtype-bin"
|
||||
mkdir -p "$voxtype_home" "$voxtype_bin"
|
||||
touch "$voxtype_bin/voxtype"
|
||||
chmod +x "$voxtype_bin/voxtype"
|
||||
voxtype_output=$(PATH="$voxtype_bin:$PATH" run_omarchy_bindings "$voxtype_home")
|
||||
grep -Fq $'SUPER + CTRL + X Toggle dictation' <<<"$voxtype_output" ||
|
||||
fail "installed Voxtype enables its toggle binding"
|
||||
grep -Fq $'F9 Start dictation (push-to-talk)' <<<"$voxtype_output" ||
|
||||
fail "installed Voxtype enables its push-to-talk binding"
|
||||
grep -Fq $'F9 Stop dictation (push-to-talk)' <<<"$voxtype_output" ||
|
||||
fail "installed Voxtype enables its release binding"
|
||||
pass "installed Voxtype conditionally enables dictation bindings"
|
||||
|
||||
missing_voxtype_output=$(run_omarchy_bindings "$voxtype_home")
|
||||
if grep -Fq $'SUPER + CTRL + X Toggle dictation' <<<"$missing_voxtype_output"; then
|
||||
fail "missing Voxtype skips its bindings"
|
||||
fi
|
||||
pass "missing Voxtype skips dictation bindings"
|
||||
|
||||
migration=$(grep -rl 'Move stock Hyprland user overrides into package defaults' "$ROOT/migrations" | head -n 1 || true)
|
||||
[[ -n $migration ]] || fail "Hyprland default config migration exists"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user