Repository navigation
Add selectable Voxtype and Superwhisper dictation #14552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a76bfea
Add selectable dictation backends
dhh 69bd2f0
Move dictation migration after repository priority update
dhh 2b9f3f0
Merge remote-tracking branch 'origin/quattro' into dictation-backends
dhh 2a0d63a
Extract backend-specific dictation installers
dhh 2ecbbcd
Keep dictation installer dispatcher executable
dhh 1a10a98
Call dictation backend installers directly
dhh a0c13f0
Drop legacy Superwhisper migration and runtime cleanup
dhh 80d0a9b
Separate dictation defaults from generic recording protocol
dhh 35e465c
Add backend-specific dictation removers
dhh 1cd018a
Preserve existing Voxtype selection during upgrade
dhh 5c4a2a6
Make dictation backend selection safe and retryable
dhh f6cc7ef
Show the dictation indicator only for selected Voxtype
dhh 6471afd
Allow switching away from stopped Superwhisper
dhh 665d182
Remove the built-in bar dictation indicator
dhh 880b701
Store default dictation selection under defaults
dhh 61ac71b
Rename dictation backend selector to use
dhh 1f7dcf9
Move dictation removers into their own menu category
dhh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| #!/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/dictation-backend" | ||
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/bin/bash | ||
|
|
||
| # omarchy:summary=Record dictation with the configured backend | ||
| # omarchy:args=<start|stop|toggle> | ||
| # omarchy:examples=omarchy dictation start | omarchy dictation toggle | ||
|
|
||
| if (($# != 1)) || [[ $1 != "start" && $1 != "stop" && $1 != "toggle" ]]; then | ||
| echo "Usage: omarchy dictation <start|stop|toggle>" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| backend=$(omarchy-default-dictation) || exit 1 | ||
| adapter="omarchy-dictation-$backend" | ||
| if omarchy-cmd-missing "$adapter"; then | ||
| echo "The selected dictation backend ($backend) is not installed." >&2 | ||
| exit 1 | ||
| fi | ||
| "$adapter" "$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/bash | ||
|
|
||
| # omarchy:summary=Record dictation using Superwhisper | ||
| # omarchy:args=<start|stop|toggle> | ||
|
|
||
| case "${1:-}" in | ||
| start|stop) superwhisper "$1" ;; | ||
| toggle) superwhisper record ;; | ||
| *) echo "Usage: omarchy dictation superwhisper <start|stop|toggle>" >&2; exit 1 ;; | ||
| esac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #!/bin/bash | ||
|
|
||
| # omarchy:summary=Record dictation using Voxtype | ||
| # omarchy:args=<start|stop|toggle> | ||
|
|
||
| case "${1:-}" in | ||
| start|stop|toggle) voxtype record "$1" ;; | ||
| *) echo "Usage: omarchy dictation voxtype <start|stop|toggle>" >&2; exit 1 ;; | ||
| esac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/bin/bash | ||
|
|
||
| # omarchy:summary=Install and configure Superwhisper dictation | ||
| # omarchy:requires-sudo=true | ||
|
|
||
| set -e | ||
|
|
||
| omarchy-pkg-add superwhisper-bin | ||
| bash /usr/share/superwhisper/setup-user | ||
| # Superwhisper requires a native recording shortcut; keep it separate from | ||
| # Omarchy's push-to-talk keys. | ||
| superwhisper shortcuts set toggle "Alt+Space" >/dev/null | ||
| superwhisper shortcuts set hold none >/dev/null | ||
| config="${XDG_CONFIG_HOME:-$HOME/.config}/omarchy/dictation-backend" | ||
| mkdir -p "${config%/*}" | ||
| printf '%s\n' superwhisper > "$config" | ||
| hyprctl reload >/dev/null | ||
| omarchy-notification-send -g "Superwhisper Dictation Ready" "Hold Right Alt or F9 to dictate (or toggle with Super + Ctrl + X)." -t 10000 | ||
| superwhisper settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| #!/bin/bash | ||
|
|
||
| # omarchy:summary=Install and configure Voxtype dictation | ||
| # omarchy:requires-sudo=true | ||
|
|
||
| set -e | ||
|
|
||
| if omarchy-cmd-missing voxtype; then | ||
| if gum confirm "Install Voxtype + AI model (~150MB) to enable dictation?"; then | ||
| omarchy-pkg-add wtype voxtype-bin | ||
| config_home="${XDG_CONFIG_HOME:-$HOME/.config}" | ||
| mkdir -p "$config_home/voxtype" | ||
| cp "$OMARCHY_PATH/default/voxtype/config.toml" "$config_home/voxtype/" | ||
|
|
||
| voxtype setup --download --no-post-install | ||
| if omarchy-hw-vulkan; then | ||
| voxtype setup gpu --enable || true | ||
| fi | ||
| voxtype setup systemd | ||
| else | ||
| exit 0 | ||
| fi | ||
| fi | ||
|
|
||
| config="${XDG_CONFIG_HOME:-$HOME/.config}/omarchy/dictation-backend" | ||
| mkdir -p "${config%/*}" | ||
| printf '%s\n' voxtype > "$config" | ||
| hyprctl reload >/dev/null | ||
| omarchy-restart-shell | ||
| omarchy-notification-send -g "Voxtype Dictation Ready" "Hold Right Alt or F9 to dictate (or toggle with Super + Ctrl + X)." -t 10000 | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| 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 }) |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.