mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Add voice dictation with voxtype (#4088)
* Try with voxtype * Update delay to prevent skipped characters * Add removal of voxtype * Use -bin package * Fix for yay * Nerdicons! * Use new, subtle nerdfont glyphs instead of standard icons * Do this in the waybar config instead * Make voxtype a permanent fixture so it is not lost on waybar resets * Record purpose * Add Dictation hotkeys * Tweak wording and point to config * Reuse the same help * Better communication * Anticipate moving the package to OPR * Clarify where the packages are coming from * input group not needed when using hyprland hotkey * Explain hotkey off * Allow for changing of the model on right click * Allow config on right click * Be more specific * Focus on config editing with waybar clicks --------- Co-authored-by: Ryan Hughes <ryan@heyoodle.com>
This commit is contained in:
committed by
GitHub
parent
e3cd567f6f
commit
0d42f1bafe
@@ -278,8 +278,8 @@ show_install_ai_menu() {
|
||||
echo ollama
|
||||
)
|
||||
|
||||
case $(menu "Install" " Dictation [AUR]\n Claude Code\n Copilot CLI [AUR]\n Cursor CLI\n Gemini\n OpenAI Codex\n LM Studio\n Ollama\n Crush") in
|
||||
*Dictation*) present_terminal "echo 'Installing Hyprwhspr from AUR...'; yay -S --noconfirm hyprwhspr && hyprwhspr setup" ;;
|
||||
case $(menu "Install" " Dictation\n Claude Code\n Copilot CLI [AUR]\n Cursor CLI\n Gemini\n OpenAI Codex\n LM Studio\n Ollama\n Crush") in
|
||||
*Dictation*) present_terminal omarchy-voxtype-install ;;
|
||||
*Claude*) install "Claude Code" "claude-code" ;;
|
||||
*Copilot*) aur_install "Copilot CLI" "github-copilot-cli" ;;
|
||||
*Cursor*) install "Cursor CLI" "cursor-cli" ;;
|
||||
@@ -368,11 +368,12 @@ show_install_elixir_menu() {
|
||||
}
|
||||
|
||||
show_remove_menu() {
|
||||
case $(menu "Remove" " Package\n Web App\n TUI\n Development\n Theme\n Windows\n Fingerprint\n Fido2") in
|
||||
case $(menu "Remove" " Package\n Web App\n TUI\n Development\n Dictation\n Theme\n Windows\n Fingerprint\n Fido2") in
|
||||
*Package*) terminal omarchy-pkg-remove ;;
|
||||
*Web*) present_terminal omarchy-webapp-remove ;;
|
||||
*TUI*) present_terminal omarchy-tui-remove ;;
|
||||
*Development*) show_remove_development_menu ;;
|
||||
*Dictation*) present_terminal omarchy-voxtype-remove ;;
|
||||
*Theme*) present_terminal omarchy-theme-remove ;;
|
||||
*Windows*) present_terminal "omarchy-windows-vm remove" ;;
|
||||
*Fingerprint*) present_terminal "omarchy-setup-fingerprint --remove" ;;
|
||||
|
||||
17
bin/omarchy-pkg-aur-add
Executable file
17
bin/omarchy-pkg-aur-add
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Add the named packages to the system from the AUR if they're missing. Returns false if it couldn't be done.
|
||||
|
||||
if omarchy-pkg-missing "$@"; then
|
||||
yay -S --noconfirm --needed "$@" || exit 1
|
||||
fi
|
||||
|
||||
for pkg in "$@"; do
|
||||
# Secondary check to handle states where pacman doesn't actually register an error
|
||||
if ! pacman -Q "$pkg" &>/dev/null; then
|
||||
echo -e "\033[31mError: Package '$pkg' did not install\033[0m" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
exit 0
|
||||
6
bin/omarchy-voxtype-config
Executable file
6
bin/omarchy-voxtype-config
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Used by Voxtype waybar module to open config on right click
|
||||
|
||||
exec omarchy-launch-editor ~/.config/voxtype/config.toml
|
||||
19
bin/omarchy-voxtype-install
Executable file
19
bin/omarchy-voxtype-install
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Install voxtype and configure it for use.
|
||||
|
||||
if gum confirm "Install Voxtype + AI model (~400MB) to enable dictation?"; then
|
||||
omarchy-pkg-add wtype
|
||||
omarchy-pkg-aur-add voxtype-bin
|
||||
|
||||
# Setup voxtype
|
||||
mkdir -p ~/.config/voxtype
|
||||
cp $OMARCHY_PATH/default/voxtype/config.toml ~/.config/voxtype/
|
||||
|
||||
voxtype setup --download
|
||||
voxtype setup systemd
|
||||
|
||||
omarchy-restart-waybar
|
||||
notify-send " Voxtype Dictation Ready" "Hold Super + Ctrl + X to dictate.\nEdit ~/.config/voxtype/config.toml for options." -t 10000
|
||||
fi
|
||||
5
bin/omarchy-voxtype-model
Executable file
5
bin/omarchy-voxtype-model
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
omarchy-launch-floating-terminal-with-presentation "voxtype setup model"
|
||||
omarchy-restart-waybar
|
||||
20
bin/omarchy-voxtype-remove
Executable file
20
bin/omarchy-voxtype-remove
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Remove voxtype and its configurations.
|
||||
|
||||
if omarchy-cmd-present voxtype; then
|
||||
echo "Uninstall Voxtype to remove dictation."
|
||||
|
||||
# Remove services
|
||||
systemctl --user stop voxtype.service 2>/dev/null || true
|
||||
rm -f ~/.config/systemd/user/voxtype*
|
||||
systemctl --user daemon-reload
|
||||
|
||||
# Remove packages and configs
|
||||
omarchy-pkg-drop wtype voxtype-bin
|
||||
rm -rf ~/.config/voxtype
|
||||
rm -rf ~/.local/share/voxtype
|
||||
else
|
||||
echo "Voxtype was not installed."
|
||||
fi
|
||||
9
bin/omarchy-voxtype-status
Executable file
9
bin/omarchy-voxtype-status
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if omarchy-cmd-present voxtype; then
|
||||
voxtype status --follow --extended --format json | while read -r line; do
|
||||
echo "$line" | jq -c '. + {alt: .class}'
|
||||
done
|
||||
else
|
||||
echo '{"alt": "", "tooltip": ""}'
|
||||
fi
|
||||
Reference in New Issue
Block a user