The installer asks for the language before the keyboard, and Setup > Language (omarchy language en|zh) switches it later. Under zh_CN the menu reads its labels from omarchy-menu.zh-cn.jsonc, the shell from I18nZh.js through I18n.tr, and notifications are worded by their sender through omarchy-text, which reads the same table. User text is never translated.
28 lines
1.1 KiB
Bash
Executable File
28 lines
1.1 KiB
Bash
Executable File
#!/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
|
|
# Existing profiles may still use Right Alt, which conflicts with Omarchy.
|
|
# Keep a recording shortcut active while moving away from that binding.
|
|
shortcuts=$(superwhisper shortcuts show)
|
|
if [[ $(jq -r '.shortcuts.hold' <<< "$shortcuts") == "RightAlt" ]]; then
|
|
if [[ -z $(jq -r '.shortcuts.toggle' <<< "$shortcuts") ]]; then
|
|
superwhisper shortcuts set hold "RightSuper" >/dev/null
|
|
else
|
|
superwhisper shortcuts set hold none >/dev/null
|
|
fi
|
|
fi
|
|
# 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
|
|
omarchy-dictation-use superwhisper
|
|
hyprctl reload >/dev/null
|
|
omarchy-notification-send -g "$(omarchy-text "Superwhisper Dictation Ready")" "$(omarchy-text "Hold Right Alt or F9 to dictate (or toggle with Super + Ctrl + X).")" -t 10000
|
|
superwhisper settings
|