Skip to content

Fix Hex dictation staying on after push-to-talk release - #17827

Merged
ryanrhughes merged 4 commits into
quattrofrom
t3/fix-hex-dictation-overlay
Nov 6, 2026
Merged

ryanrhughes merged 4 commits into
quattrofrom
t3/fix-hex-dictation-overlay

Conversation

@ryanrhughes

@ryanrhughes ryanrhughes commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

With Hex as the dictation backend, releasing Right Alt left the Hex recording overlay up for good; Hex never got the stop.

omarchy-dictation-hex stop only sent the stop if Hex looked like it was dictating, and it checked by reading .desktop.activity.state from hex status. Plain hex status prints text, and the JSON from hex status --json has no such field (a recording shows up as .capture.recording == "dictation"). The check never matched, so stop always assumed Hex was idle and returned without doing anything. Alt + Space toggle had the same problem and always tried to start.

Fixing the field alone isn't enough. Hex only reports a recording ~130-150ms after hex dictation start returns, so a quick tap of Right Alt would still slip through a status check. Hex does run commands in order, though, and a stop sent right after a start always landed when I tried it. So now:

  • stop always sends hex dictation stop --print. No speech (exit 4), Hex not running (exit 3), and nothing recording (exit 1, confirmed with hex status --json afterwards) all count as a quiet success.
  • Hex's error message is only shown when the stop really failed, so switching away from Hex stays silent.
  • toggle reads .capture.recording from hex status --json.
  • The transcript is pasted instead of typed through wtype, so long dictation lands at once. It uses SUPER + V's universal paste (Ctrl+Shift+V in terminals, Ctrl+V elsewhere), the same split Superwhisper uses. clipboard.lua exposes that action as o.universal_paste, and omarchy-clipboard-paste-text --universal dispatches it, so the terminal check lives in one place. Shift+Insert was the first try, but kitty maps it to the primary selection.

The test's fake hex answered with the same made-up desktop.activity.state shape, which is why it passed. It now matches the replies from real Hex 3.3.0.

Verification

  • bash test/shell.d/dictation-test.sh, clipboard-test.sh, hyprland-default-config-test.sh and hyprland-binding-conflicts-test.sh pass. The new quick-tap check in the dictation test (stop while status still says idle) fails against the old adapter.
  • Against a live Hex: a quick start/stop, a 1s hold, and a stop while idle all exited 0, and hex status --json showed capture.state back at idle each time.
  • Not yet checked on a live desktop: the universal paste from a dictation, in a terminal and in a browser.
  • Checked that packaged hex-bin 3.3.0 has the same capture fields and not-recording code as the dev build I tested on.

Screenshots

No visible change: Hex's own overlay now closes on release like it should; nothing in Omarchy's UI changes.

The adapter read `.desktop.activity.state` from plain `hex status`, which
never matched, so stop assumed Hex was idle and never sent the stop. Always
send `hex dictation stop --print` and treat no speech, Hex not running, or
nothing recording as a quiet success; toggle reads `.capture.recording` from
`hex status --json`. Hex only reports a recording ~150ms after it starts, so
gating stop on status would still miss a quick tap.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@greptile-apps

greptile-apps Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are addressed, and no new actionable issues were found.

Summary

Fixes Hex push-to-talk stopping and reuses universal paste for transcripts.

  • Hex dictation stops on release even when its status is behind.
  • Hex dictation pastes transcripts with the same action as SUPER + V.

Reviews (4) · Last reviewed commit: "Report Hex stop failures unless Hex conf..." · Reviewed by Greptile

Comment thread bin/omarchy-dictation-hex Resolved
Comment thread bin/omarchy-dictation-hex Resolved
ryanrhughes and others added 3 commits November 5, 2026 20:54
Typing a long transcript through wtype is slow to land. Shift+Insert pastes
the clipboard in terminals and other apps alike, the same way clipboard
history and the emoji picker insert text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Shift+Insert pastes the primary selection in kitty. Superwhisper sends
Ctrl+Shift+V to terminals and Ctrl+V elsewhere, so expose SUPER + V's
universal paste as o.universal_paste and give omarchy-clipboard-paste-text a
--universal mode that dispatches it. Hex now uses that, sharing the terminal
tag check with the key binding.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A failed stop was treated as success whenever `hex status` also failed,
since an unanswered status read as idle. Only swallow the error after a
status reply shows nothing recording. When mktemp fails, still send the
stop and let Hex's message through instead of failing the redirect.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ryanrhughes
ryanrhughes merged commit ad4977b into quattro Nov 6, 2026
3 of 4 checks passed
@ryanrhughes
ryanrhughes deleted the t3/fix-hex-dictation-overlay branch November 6, 2026 05:11
cursor Bot pushed a commit to mark-groves/omarchy that referenced this pull request Nov 6, 2026
* Fix Hex dictation staying on after push-to-talk release

The adapter read `.desktop.activity.state` from plain `hex status`, which
never matched, so stop assumed Hex was idle and never sent the stop. Always
send `hex dictation stop --print` and treat no speech, Hex not running, or
nothing recording as a quiet success; toggle reads `.capture.recording` from
`hex status --json`. Hex only reports a recording ~150ms after it starts, so
gating stop on status would still miss a quick tap.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Paste Hex transcripts with Shift+Insert instead of typing them

Typing a long transcript through wtype is slow to land. Shift+Insert pastes
the clipboard in terminals and other apps alike, the same way clipboard
history and the emoji picker insert text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Paste Hex transcripts the way SUPER + V does

Shift+Insert pastes the primary selection in kitty. Superwhisper sends
Ctrl+Shift+V to terminals and Ctrl+V elsewhere, so expose SUPER + V's
universal paste as o.universal_paste and give omarchy-clipboard-paste-text a
--universal mode that dispatches it. Hex now uses that, sharing the terminal
tag check with the key binding.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Report Hex stop failures unless Hex confirms it is idle

A failed stop was treated as success whenever `hex status` also failed,
since an unanswered status read as idle. Only swallow the error after a
status reply shows nothing recording. When mktemp fails, still send the
stop and let Hex's message through instead of failing the redirect.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
omarchybot added a commit to kvnloo/omarchy that referenced this pull request Nov 17, 2026
quattro's omacom#17827 added --universal to omarchy-clipboard-paste-text. Keep it beside the optional window-address argument; the refocus step runs before whichever paste mode was chosen.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant