#!/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