hex/src/linux
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dax c4e361b214
labs: copy a dictation's kept audio as a file (#1860)
* labs: copy a kept dictation recording as a file

Adds the Copy dictation audio lab (Labs › History, off by default,
labs.copy_dictation_audio). It stores no audio: History entries that
Labs › Keep recordings gave a WAV gain Copy audio beside Play, and the
macOS menu bar and the Linux and Windows tray gain Copy last dictation
audio, which copies the newest entry that kept its audio. macOS uses
Scrawl's file pasteboard, Windows CF_HDROP, and Linux a text/uri-list
through the process's one LinuxPaster, which now lives in
linux::paste::with_paster so captures and History share it.

A missing recording or a refused clipboard says so under the row in
History, as a failed Play does; the menus log it, as Copy recent
dictations does. The newest-recording lookup skips entries whose file
is gone, with a unit test. Docs, translations, labs.json, and the Labs
goldens follow.

* labs: copy dictation audio off the UI thread and behind both switches

Review fixes for the Copy dictation audio lab:

- History's Copy audio now runs like Transcribe again: the file lookup on
  the window, then a worker named hex-copy-audio does the clipboard write
  (which can wait on another app, Annotate's paster, X11 or wl-copy) and
  reports Copied or the error back through the window's waker. The button
  reads Copying… while it runs.
- HistoryStore::newest_recording now takes now_ms and filters by the
  store's retention cutoff, like recent() and search(); the unit test
  covers a file deleted behind the store, the cutoff boundary, and an
  expired entry.
- The menu bar and tray item, and the History action, need both this lab
  and Keep recordings; the gate and every handler re-check both. A copy
  failure from the menu or tray stays logged, as the menu's other copy
  actions do, and the docs record that limit.
- Copy's text check and Copy audio's check clear each other.
- A UI test pins Copy audio absent with either switch off and present
  with both on.
- Card and site summary say menu bar or tray; the validateMenuItem doc
  names both dimmed rows; WindowsDesktopHost::history follows new(); the
  History feature map mentions the action.

* labs: hold text Copy behind a running Copy audio, and refresh the tray

Follow-ups from the PR review:

- A pending Copy audio keeps a text Copy from starting, since its worker
  still lands the WAV on the clipboard; text Copy only clears a settled
  audio state. The UI test pins it.
- The Linux and Windows trays compare Copy audio's availability with the
  last value, so a recording that appears or expires redraws the menu
  without a snapshot or publish change; the gate is read first and
  History only with a tray, keeping the check cheap.
- Move Copy audio's worker state into history/audio.rs so
  rune_ui/history.rs stays under the 1,500-line cap.
2026-11-15 12:08:47 -05:00
..
app labs: copy a dictation's kept audio as a file (#1860) 2026-11-15 12:08:47 -05:00
dictation feat(labs): YOLO mode presses Return after long dictations (#1812) 2026-11-13 20:02:34 -08:00
input fix(linux): keep dictation working when a shortcut can't be registered (#1746) 2026-11-12 12:18:09 -08:00
protocols linux: live typing through the wayland input method (labs) (#1485) 2026-11-07 08:36:15 -05:00
annotate_overlays.rs Linux: Annotate on GNOME lab (capsule and ink float on XWayland) (#1529) 2026-11-08 04:13:40 -05:00
app.rs Bump Rune to 1899e64: overlays pace frames with the swap chain on Windows (#1832) 2026-11-14 20:40:20 -05:00
atspi.rs Fold linux_* into linux/ 2026-10-31 14:32:07 -07:00
audio_control.rs labs: apply While dictating only on speakers (#1610) 2026-11-09 20:24:42 -05:00
background.rs Linux: Background portal for running in the background and Launch at login (#812); launcher entry written once (#810) (#824) 2026-11-01 07:41:50 -05:00
clipboard.rs linux: restore the readable clipboard formats when one can't be read (#1787) 2026-11-13 10:06:06 -05:00
context.rs fix(dictation): share correction order and keep stop-time context (t1534) 2026-11-12 12:48:45 -08:00
dictation.rs feat(labs): YOLO mode presses Return after long dictations (#1812) 2026-11-13 20:02:34 -08:00
gnome_shortcuts.rs fix(linux): keep dictation working when a shortcut can't be registered (#1746) 2026-11-12 12:18:09 -08:00
gsettings.rs GNOME without a shortcuts portal: one click adds Hex's custom keyboard shortcuts (#781) (#785) 2026-11-01 03:10:20 -05:00
icons.rs linux: recolor the tray mark with the panel's text color (#1691) 2026-11-11 10:46:08 -05:00
input.rs feat(labs): YOLO mode presses Return after long dictations (#1812) 2026-11-13 20:02:34 -08:00
input_route.rs chore(fixtures): remove personal data from preview fixtures (#1676) 2026-11-10 20:11:38 -08:00
live_typing.rs linux: live typing through the wayland input method (labs) (#1485) 2026-11-07 08:36:15 -05:00
login_item.rs Fix #1164: Launch at login status with Home Manager module (#1166) 2026-11-03 12:19:33 -05:00
meeting_capsules.rs Linux: Annotate on GNOME lab (capsule and ink float on XWayland) (#1529) 2026-11-08 04:13:40 -05:00
output.rs linux: open the annotate pen on the recorded output (#1515) 2026-11-07 23:14:58 -05:00
paste.rs labs: copy a dictation's kept audio as a file (#1860) 2026-11-15 12:08:47 -05:00
pipewire.rs fix(linux): pass pw-cat --raw only where pipewire knows it (#1803) 2026-11-13 16:30:28 -05:00
portal.rs linux: adopt the Wayland display for hex dictate and fix its ready line (#1506) (#1507) 2026-11-07 16:56:25 -05:00
remote_desktop.rs feat(labs): YOLO mode presses Return after long dictations (#1812) 2026-11-13 20:02:34 -08:00
rune_hud.rs labs: voice prompt, speak an instruction to rewrite one dictation (#1716) 2026-11-12 07:18:02 -05:00
service.rs chore(fixtures): remove personal data from preview fixtures (#1676) 2026-11-10 20:11:38 -08:00
session.rs Linux: no fixed-size map on floating desktops; Launch at login follows a moved Hex (#736) (#741) 2026-10-31 23:20:19 -04:00
tray.rs labs: copy a dictation's kept audio as a file (#1860) 2026-11-15 12:08:47 -05:00
typed_text.rs fix(linux): let the copy land before reading the clipboard in typed text (#1563) 2026-11-08 19:38:04 -05:00