Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
37 changes: 37 additions & 0 deletions bin/omarchy-default-dictation
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
18 changes: 18 additions & 0 deletions bin/omarchy-dictation
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"
10 changes: 10 additions & 0 deletions bin/omarchy-dictation-superwhisper
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
9 changes: 9 additions & 0 deletions bin/omarchy-dictation-voxtype
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
19 changes: 19 additions & 0 deletions bin/omarchy-install-dictation-superwhisper
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
30 changes: 30 additions & 0 deletions bin/omarchy-install-dictation-voxtype
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
Comment thread
dhh marked this conversation as resolved.
Resolved
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
26 changes: 0 additions & 26 deletions bin/omarchy-voxtype-install

This file was deleted.

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-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
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-default-dictation)\" == \"voxtype\" ]]","action":"omarchy-default-dictation voxtype"},
"setup.default.dictation.superwhisper": {"icon":"","label":"Superwhisper","checked":"[[ \"$(omarchy-default-dictation)\" == \"superwhisper\" ]]","action":"omarchy-default-dictation 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
12 changes: 10 additions & 2 deletions manual/11-text-extraction-dictation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ 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 through Setup > Defaults > Dictation. The backend installer configures it and saves the selection. Run `omarchy default dictation` to see which one is selected. Dictation requires an explicit selection.

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.

Additional backends can integrate without changing Omarchy. Provide an executable named `omarchy-dictation-<backend>` on PATH that accepts `start`, `stop`, and `toggle` and returns a nonzero status on failure. Its installer configures the provider and writes its backend name to `${XDG_CONFIG_HOME:-$HOME/.config}/omarchy/dictation-backend` after successful setup. Backend names use lowercase letters, digits, and hyphens. Provide `omarchy-install-dictation-<backend>` for setup; `omarchy default dictation <backend>` launches it. Add a Defaults menu entry through an Omarchy menu extension to call that selector. Optional desktop integration can live in `${XDG_CONFIG_HOME:-$HOME/.config}/<backend>/shortcuts.lua`.
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-default-dictation",
"omarchy-dns"
]

Expand Down
Loading