Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/omarchy
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ GROUP_DESCRIPTIONS[finalize]="Finalize user setup"
GROUP_DESCRIPTIONS[default]="Default application selection"
GROUP_DESCRIPTIONS[dev]="Omarchy development tools"
GROUP_DESCRIPTIONS[disk]="Disk performance helpers"
GROUP_DESCRIPTIONS[dictation]="Dictation recording"
GROUP_DESCRIPTIONS[display]="Display and text scaling"
GROUP_DESCRIPTIONS[dns]="DNS resolver configuration"
GROUP_DESCRIPTIONS[drive]="Drive selection and encryption"
Expand Down
86 changes: 86 additions & 0 deletions bin/omarchy-dictation
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#!/bin/bash

# omarchy:summary=Record dictation and select its backend
# omarchy:args=<start|stop|toggle|backend> [voxtype|superwhisper]
# omarchy:examples=omarchy dictation start | omarchy dictation backend superwhisper

config="${XDG_CONFIG_HOME:-$HOME/.config}/omarchy/dictation-backend"

configure_backend() {
if (($# == 0)); then
if [[ -f $config ]]; then
read -r backend < "$config"
case "$backend" in
voxtype|superwhisper) printf '%s\n' "$backend" ;;
*) echo "Invalid dictation backend in $config" >&2; exit 1 ;;
esac
elif omarchy-cmd-present voxtype; then
echo "voxtype"
elif omarchy-cmd-present superwhisper; then
echo "superwhisper"
else
echo "No dictation backend installed. Install Voxtype or Superwhisper." >&2
exit 1
fi
else
if (($# != 1)) || [[ $1 != "voxtype" && $1 != "superwhisper" ]]; then
echo "Usage: omarchy dictation backend [voxtype|superwhisper]" >&2
exit 1
fi

if omarchy-cmd-missing "$1"; then
omarchy-launch-floating-terminal-with-presentation "omarchy-install-dictation-$1"
else
# Superwhisper requires a recording shortcut. Keep its native toggle away
# from Omarchy's Right Alt/F9 hold and Super + Ctrl + X toggle.
if [[ $1 == "superwhisper" ]]; then
if ! superwhisper shortcuts set toggle "Alt+Space" >/dev/null || ! superwhisper shortcuts set hold none >/dev/null; then
omarchy-notification-send "Dictation setup failed" "Finish any recording and try selecting Superwhisper again."
exit 1
fi
fi

mkdir -p "${config%/*}" || exit 1
printf '%s\n' "$1" > "$config" || exit 1
Comment thread
dhh marked this conversation as resolved.
Resolved

# Backend integration follows the selection even when switching to Voxtype.
if [[ -n ${HYPRLAND_INSTANCE_SIGNATURE:-} ]]; then
hyprctl reload >/dev/null
fi
fi
fi
}

case "${1:-}" in
backend)
shift
configure_backend "$@"
;;
start|stop|toggle)
if (($# != 1)); then
echo "Usage: omarchy dictation <start|stop|toggle>" >&2
exit 1
fi
action=$1
backend=$(configure_backend) || exit 1
Comment thread
dhh marked this conversation as resolved.
Resolved
if omarchy-cmd-missing "$backend"; then
echo "The selected dictation backend ($backend) is not installed." >&2
exit 1
fi

case "$backend" in
voxtype) voxtype record "$action" ;;
superwhisper)
if [[ $action == "toggle" ]]; then
superwhisper record
else
superwhisper "$action"
fi
;;
esac
;;
*)
echo "Usage: omarchy dictation <start|stop|toggle|backend> [voxtype|superwhisper]" >&2
exit 1
;;
esac
12 changes: 12 additions & 0 deletions bin/omarchy-install-dictation-superwhisper
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/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
omarchy-dictation backend superwhisper
omarchy-notification-send -g  "Superwhisper Dictation Ready" "Hold Right Alt or F9 to dictate (or toggle with Super + Ctrl + X)." -t 10000
superwhisper settings
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ if gum confirm "Install Voxtype + AI model (~150MB) to enable dictation?"; then
voxtype setup gpu --enable || true
fi
voxtype setup systemd
omarchy-dictation backend voxtype

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
omarchy-notification-send -g  "Voxtype Dictation Ready" "Hold Right Alt or F9 to dictate (or toggle with Super + Ctrl + X)." -t 10000
fi
4 changes: 4 additions & 0 deletions bin/omarchy-voxtype-remove
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ if omarchy-cmd-present voxtype; then
omarchy-pkg-drop voxtype-bin
rm -rf ~/.config/voxtype
rm -rf ~/.local/share/voxtype
backend_config="${XDG_CONFIG_HOME:-$HOME/.config}/omarchy/dictation-backend"
if [[ -f $backend_config && $(< "$backend_config") == "voxtype" ]]; then
rm "$backend_config"
fi
hyprctl reload >/dev/null
else
echo "Voxtype was not installed."
Expand Down
7 changes: 7 additions & 0 deletions default/hypr/bindings/dictation.lua
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 })
5 changes: 0 additions & 5 deletions default/hypr/bindings/voxtype.lua

This file was deleted.

24 changes: 24 additions & 0 deletions default/hypr/dictation-backend.lua
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-dictation backend 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(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
3 changes: 2 additions & 1 deletion default/hypr/omarchy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ 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("default.hypr.bindings.dictation")
require_optional.module("default.hypr.bindings.applications")
end
require("default.hypr.envs")
require("default.hypr.looknfeel")
require("default.hypr.qconsole")
require("default.hypr.input")
require("default.hypr.windows")
require("default.hypr.dictation-backend")

-- Current theme overrides.
require_optional.module("omarchy.current.theme.hyprland")
4 changes: 3 additions & 1 deletion default/omarchy/omarchy-menu.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@
"setup.default.browser.edge": {"icon":"󰇩","label":"Edge","checked":"[[ \"$(omarchy-default-browser)\" == \"edge\" ]]","action":"omarchy-default-browser edge"},
"setup.default.browser.firefox": {"icon":"","label":"Firefox","checked":"[[ \"$(omarchy-default-browser)\" == \"firefox\" ]]","action":"omarchy-default-browser firefox"},
"setup.default.browser.zen": {"icon":"󰖟","label":"Zen","checked":"[[ \"$(omarchy-default-browser)\" == \"zen\" ]]","action":"omarchy-default-browser zen"},
"setup.default.dictation": {"icon":"","label":"Dictation","title":"Default Dictation"},
"setup.default.dictation.voxtype": {"icon":"","label":"Voxtype","checked":"[[ \"$(omarchy-dictation backend)\" == \"voxtype\" ]]","action":"omarchy-dictation backend voxtype"},
"setup.default.dictation.superwhisper": {"icon":"","label":"Superwhisper","checked":"[[ \"$(omarchy-dictation backend)\" == \"superwhisper\" ]]","action":"omarchy-dictation backend superwhisper"},
"setup.default.terminal": {"icon":"","label":"Terminal","title":"Default Terminal"},
"setup.default.terminal.alacritty": {"icon":"","label":"Alacritty","checked":"[[ \"$(omarchy-default-terminal)\" == \"alacritty\" ]]","action":"omarchy-default-terminal alacritty"},
"setup.default.terminal.foot": {"icon":"","label":"Foot","checked":"[[ \"$(omarchy-default-terminal)\" == \"foot\" ]]","action":"omarchy-default-terminal foot"},
Expand Down Expand Up @@ -247,7 +250,6 @@
"install.terminal.kitty": {"icon":"","label":"Kitty","disabled":"omarchy-pkg-present kitty","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-install-terminal kitty'"},
"install.ai.chatgpt": {"icon":"","iconFont":"omarchy","label":"ChatGPT Desktop","disabled":"omarchy-pkg-present openai-codex-desktop","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-ai-chatgpt"},
"install.ai.claude": {"icon":"","iconFont":"omarchy","label":"Claude Desktop","disabled":"omarchy-pkg-present claude-desktop","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-ai-claude"},
"install.ai.dictation": {"icon":"","label":"Dictation","disabled":"omarchy-pkg-present voxtype-bin","action":"omarchy-launch-floating-terminal-with-presentation omarchy-voxtype-install"},
"install.ai.grok-bot": {"icon":"","iconFont":"omarchy","label":"Grok Bot","disabled":"omarchy-pkg-present grok-bot","action":"omarchy-install-and-launch 'Grok Bot' grok-bot grok-bot"},
"install.ai.hermes": {"icon":"","iconFont":"omarchy","label":"Hermes Desktop","disabled":"omarchy-pkg-present hermes-desktop","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-ai-hermes"},
"install.ai.lm-studio": {"icon":"","iconFont":"omarchy","label":"LM Studio","disabled":"omarchy-pkg-present lmstudio-bin","action":"omarchy-install-app 'LM Studio' lmstudio-bin"},
Expand Down
2 changes: 1 addition & 1 deletion default/voxtype/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
state_file = "auto"

[hotkey]
# Hotkey is configured in Hyprland. Default is Super + Ctrl + X
# Hotkeys are configured in Hyprland: hold Right Alt or F9, or toggle with Super + Ctrl + X.
enabled = false

[audio]
Expand Down
4 changes: 2 additions & 2 deletions install/user/first-run/install-voxtype.hook
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

if omarchy-done ensure voxtype-install-invitation; then
omarchy-notification-send -u critical -g  "Install Dictation with Voxtype" \
omarchy-notification-send -u critical -g  "Install Dictation" \
"Click to install voice dictation for Omarchy." \
--exec omarchy-launch-floating-terminal-with-presentation omarchy-voxtype-install
--exec omarchy-menu summon setup.default.dictation
fi
4 changes: 2 additions & 2 deletions manual/07-hotkeys.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ Usually on Linux, you need `Ctrl + Shift + C/V` to copy'n'paste in the terminal
| `Super + Alt + ]` | Make webcam overlay larger while recording |
| `Alt + Shift + L` | Copy current URL from webapp or Chromium |
| `Alt + Shift + D` | Download the video on the current page to `~/Videos` |
| `Super + Ctrl + X` | Start/stop dictation (requires _Install > AI > Dictation_) |
| `F9` | Push-to-talk dictation (requires _Install > AI > Dictation_) |
| `Super + Ctrl + X` | Start/stop dictation (requires _Setup > Defaults > Dictation_) |
| `Right Alt` / `F9` | Push-to-talk dictation (requires Voxtype or Superwhisper) |

With screenrecordings, the hotkey first asks which audio you want, then starts recording. Hit it again to stop. See [screenshots and recording](12-screenshots-recording.md) for the details.

Expand Down
10 changes: 8 additions & 2 deletions manual/11-text-extraction-dictation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ This is very helpful for grabbing addresses out of image footers or phone number

### Dictation

Omarchy offers AI dictation via [Voxtype](https://voxtype.io/). You install it via _Install > AI > Dictation_ through the Omarchy menu. By default, it'll load a base English model that takes up 150MB. But you can tweak which model you'd like to use by running `voxtype setup model` in the terminal. And you can tweak all the settings via `~/.config/voxtype/config.toml`.
Install [Voxtype](https://voxtype.io/) or [Superwhisper](https://superwhisper.com/) through _Setup > Defaults > Dictation_ in the Omarchy menu. Selecting a backend installs it if needed and makes it the default for dictation. Voxtype loads a base English model that takes up 150MB; change the model with `voxtype setup model` and other settings through `~/.config/voxtype/config.toml`. Superwhisper opens its settings to choose cloud or local processing, and OPR keeps the application updated.

Once installed, you dictate by holding down `F9` or by toggling with `Super + Ctrl + X`, and the dictated text will appear in the focused input area.
Once installed, you dictate by holding down `Right Alt` or `F9`, or by toggling with `Super + Ctrl + X`, and the dictated text will appear in the focused input area. On keyboard layouts where Right Alt is AltGr, use `F9` to keep AltGr available for typing.

The same shortcuts can use an installed Superwhisper instead. Select your backend with `omarchy dictation backend voxtype` or `omarchy dictation backend superwhisper`. Run `omarchy dictation backend` to see which one is selected. Without an explicit selection, Omarchy uses Voxtype when installed, otherwise Superwhisper.

Omarchy loads the selected backend's desktop integration automatically. No Superwhisper configuration is needed in `~/.config/hypr/`; selecting a backend removes Superwhisper's old generated block from `bindings.lua` with a backup, preserving personal bindings.
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Resolved

Custom bindings and scripts can use `omarchy dictation start`, `omarchy dictation stop`, and `omarchy dictation toggle`. The selected backend handles the recording and transcription. Selecting Superwhisper disables its native hold shortcut and sets its native toggle to `Alt + Space`, keeping it separate from Omarchy's recording keys. Superwhisper requires at least one native recording shortcut, and its cancellation shortcut stays available. If Superwhisper was selected automatically, run `omarchy dictation backend superwhisper` once to configure these shortcuts.
1 change: 1 addition & 0 deletions shell/plugins/menu/MenuModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ var GUARD_READERS = [
"omarchy-default-browser",
"omarchy-default-editor",
"omarchy-default-terminal",
"omarchy-dictation backend",
"omarchy-dns"
]

Expand Down
Loading