Repository navigation
Conversation
[Medium impact] The PR appears safe to merge; the previous restart-and-cancel issue is fixed, and no new actionable issues were found. SummaryClipboard history, file paste, and emoji insertion now send Shift+Insert through Hyprland. New Voxtype configs use clipboard output with hooks that paste the transcript.
|
|
Triage classified this pull request before reviewing it, and the two classifiers did not agree, so it has no class label yet and the full review (worker run, suite, second-opinion review) has not started.
Both readings are reasonable, since the paste-helper half is a straight fix and the voxtype default is a change of behaviour. The maintainer decides which it is, or whether to split it into two pull requests. GitHub also reports that this branch currently conflicts with Waiting on the maintainer for the classification. Nothing was run or pushed. |
|
Confirming the bug and that this approach fixes it. On Omarchy 4.5.0-3 (Hyprland 0.56.2), picking an entry in the clipboard manager (Super+Ctrl+V → Enter) did not reliably paste into the focused window in Foot, T3Code or Zen Browser. The entry reached the clipboard, but the I patched a local clone of the clipboard plugin to do what this PR does: copy with the stock |
…ive them wtype types through a keymap XWayland clients never load, so its Shift+Insert reaches them as Shift+Escape and nothing is pasted. The clipboard history paste, file paste and emoji picker now send the chord through Hyprland's send_key_state, as the universal clipboard bindings do.
In type mode wtype's keys reach XWayland apps, such as the ChatGPT and Hermes desktop apps, as Escape and digits instead of the transcript. New installs copy the transcript and paste it from the output hooks with a Shift+Insert sent by Hyprland. The hooks only paste after real output, not after a cancelled or empty recording, and only in clipboard mode.
4954a80 to
7feb244
Compare
|
Rebased onto current |
If Voxtype stopped between its pre and post output hooks, the marker survived the restart, and cancelling the next recording pasted whatever was on the clipboard. The marker now holds the service's systemd invocation id, and the paste only happens when it still matches.
Fixes #16536
Voxtype dictation, the clipboard history paste and the emoji picker all send keys through wtype, which XWayland apps read as Escape, digits and letters. Dictating into the ChatGPT or Hermes desktop app (both XWayland) types something like
1234315671635789430-=724qw764ert7yuio, and the paste chord arrives as Shift+Escape. The issue has the reproduction and a delivery matrix.Hyprland can press the keys itself on the seat's own keymap, which XWayland apps receive as sent. Omarchy's universal copy and paste bindings already do this in
default/hypr/bindings/clipboard.lua.What changes
omarchy-hyprland-send-shortcut <mods> <key>(hidden) sends a chord to the focused surface throughhl.dsp.send_key_state, with the same no-window-target and down/up split asclipboard.lua.omarchy-clipboard-paste-text,omarchy-clipboard-paste-fileandomarchy-menu-emoji-insertsend their Shift+Insert through it instead ofwtype -M shift -k Insert -m shift.Voxtype has no keystroke driver that goes through the compositor, so
default/voxtype/config.tomlswitches tomode = "clipboard"and pastes from the output hooks:pre_output_command = "omarchy-voxtype-output begin",post_output_command = "omarchy-voxtype-output end".post_output_commandafter cancelled and empty recordings too, soendonly pastes after abegin. That keeps a cancelled recording from pasting whatever was on the clipboard.beginarms nothing unless the configured mode isclipboard, so a user who switches back to type or paste mode doesn't get the transcript twice.endwaits 100 ms before pasting, as voxtype's own paste mode does.Existing voxtype configs are left alone, since the new mode changes clipboard behaviour (below). To opt in:
Note on migration
This PR deliberately ships no migration, so existing installs keep type mode and stay broken in XWayland apps until they opt in. I wrote and tested one and left it out because it would change clipboard behaviour for existing users without asking. That's a call for maintainers, and #15490 carries a competing migration. If you want it, I can add it here or in a follow-up. It:
mode = "type", nodriver_order, and nopre_output_commandorpost_output_command. Any config that chose its own output was left alone.voxtype config set, which keeps comments and other settings.voxtype statuswas idle, so a recording in progress picked the change up at its next restart.driver_order(untouched), and a machine with no voxtype config (no-op).Trade-off
Dictation on new installs now replaces the clipboard, as #15490 and #13098 would. The previous entry stays in clipboard history (Super + Ctrl + V). Paste also delivers characters wtype drops even in native apps (the em dash in the issue's matrix) and lands the whole transcript at once, which removes the focus drift #6589 guards against.
Relation to open PRs
#15490 moves voxtype to paste mode with Shift+Insert, but voxtype sends
paste_keysthrough wtype first, so XWayland apps still get Shift+Escape. This PR gets the same paste behaviour with the chord sent by Hyprland. On the output mode it would supersede #15490 and #9641. Unlike #15490 it doesn't migrate existing configs.Testing
bash test/shell.d/dictation-test.sh,clipboard-test.sh,emojis-test.sh, and./test/cliendwithoutbegin) or type mode must not paste.--ozone-platform=x11and--ozone-platform=wayland, and a GTK key logger under both GDK backends: Hyprland's Shift+Insert pastedDictation into ChatGPT — café, naïve 123.intact in both, where wtype's Shift+Insert pasted nothing under XWayland.