Direct typing turns each character into a keycode, so on Linux it drops
capitals and accents and types the wrong characters on non-US layouts
(#429, #439, #1853). Shift+Insert pastes in GUI apps and terminals alike
once the transcript is also on the primary selection, which kitty, Ghostty,
Alacritty, xterm and VTE read; both are restored afterwards.
New installs get Shift+Insert and a longer restore delay, since Linux apps
fetch the clipboard only when they handle the key. Existing settings are left
alone; a Linux-only What's New note suggests switching. Release notes can now
be platform-specific for that.
Also fixes the enigo Shift+Insert fallback, which sent the keysym for 'v'
and typed 'V'.
* fix(windows): copy the transcript when the focused app runs as administrator
Windows drops keystrokes sent from Handy to an elevated window, and
SendInput isn't documented to report it, so a paste there can fail with
nothing shown. Check the focused window's integrity level before
pasting; when it outranks Handy, leave the transcript on the clipboard
and raise a notice that says to press Ctrl+V.
Refs #434
* fix(windows): only report a paste an elevated window blocks
Leaving the transcript on the clipboard overrode the user's Clipboard
Handling setting. Run the paste exactly as configured and change only
what Handy reports: an error naming the cause, with History as the way
to get the text.
Refs #434
* docs: note Windows admin app limitations
* Let AppImage users opt into native Wayland
The AppImage hook forces GDK_BACKEND=x11 after the user's environment,
so GDK_BACKEND=wayland never reaches Handy. Copy HANDY_GDK_BACKEND into
GDK_BACKEND before GTK starts so the hook cannot override it. Default
stays X11 (tauri#8541); #1729 and #2034 need Wayland.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor: drop unused return value from apply_handy_gdk_backend
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: CJ Pais <cj@cjpais.com>
WebKitGTK 2.54 composites only the damaged region of every frame. With the
DMA-BUF renderer disabled — the long-standing workaround for GPU crashes
(tauri-apps/tauri#9394) — those partial frames arrive in fresh shared-memory
buffers, so every pixel outside the damage becomes transparent. Handy's
frameless overlay card kept only its animated dot and waveform, which users
saw as a half-transparent card with the desktop showing through.
Pick the renderer from the WebKitGTK version linked into the process instead of
always disabling DMA-BUF: 2.54 and newer keep the compositor and move its swap
chain to shared memory (WEBKIT_DMABUF_RENDERER_FORCE_SHM=1), older releases
keep DMA-BUF off as before. Explicit values for either variable still win, and
the Nix wrapper no longer pins the renderer so the runtime policy applies.
Verified headlessly against WebKitGTK 2.54.1 (private sway output, production
environment): before the change a 6940 px recording card painted 600 px, after
it the full compact card and the expanded panel paint exactly as on WebKitGTK
2.52.6, while an explicit WEBKIT_DISABLE_DMABUF_RENDERER=1 still reproduces the
old behavior.
Refs #2166.
* Add transcription hook
Add support for transcription hook - an executable script in app's data directory.
If `hooks/transcription` file exists, Handy runs it passing transcription text via stdin and
uses script stdout as a transcription result.
This approach is a flexible extension point for advanced users
(which nowadays means with access to coding LLM) akin to git hooks.
Here are some possible scenarios:
* simple transcription modifications
* a pipeline involving LLM processing, language detection and translation
* custom paste method (as Handy does nothing if transcription is empty)
* conditional processing based on the active application waiting for the input
See related:
* https://github.com/cjpais/Handy/discussions/168
* https://github.com/cjpais/Handy/discussions/162
* https://github.com/cjpais/Handy/discussions/916
* https://github.com/cjpais/Handy/discussions/911
* https://github.com/cjpais/Handy/discussions/834
* https://github.com/cjpais/Handy/discussions/847
* https://github.com/cjpais/Handy/discussions/833
* https://github.com/cjpais/Handy/discussions/662
* https://github.com/cjpais/Handy/discussions/601
* https://github.com/cjpais/Handy/discussions/335
* https://github.com/cjpais/Handy/pull/739
* https://github.com/cjpais/Handy/pull/638
* https://github.com/cjpais/Handy/pull/455
* https://github.com/cjpais/Handy/issues/157
* fix: run the transcription hook on every pasted transcription, and bound it
The hook lived inside TranscriptionManager::transcribe(), so streaming
transcriptions (finalize_stream) never reached it, while history retries and
the CLI benchmark did, meaning a custom-paste hook could paste when retrying a
history entry. It now runs in the paste path, after LLM post-processing, and
leaves history untouched.
A hung hook used to block the pipeline forever. It now runs as a tokio child
with kill_on_drop, under a 30s timeout and the cancel shortcut, falling back to
the original text. It also uses the portable-aware data dir, feeds stdin while
reading output to avoid pipe deadlocks, and strips one trailing newline so a
plain `echo` doesn't submit the line in a terminal.
* refactor: trim the transcription hook and its README section
Drops the unit tests and folds the timeout into run(), so one error path
covers spawn failures, non-zero exits and timeouts. The README section is cut
to a short description and one example.
* docs: note that the transcription hook doesn't inherit the shell's PATH
Handy launched from the Dock gets launchd's minimal PATH, so Homebrew
tools called from a hook aren't found.
---------
Co-authored-by: CJ Pais <cj@cjpais.com>
Keep DMA-BUF rendering disabled by default, but preserve explicit environment values so users affected by overlay flickering can opt out. Make the Nix wrapper respect the same precedence and document restart and autostart requirements.
Refs #2166
* docs: explain how to restore the recording overlay on Omarchy
* docs: focus Omarchy workaround on required steps
---------
Co-authored-by: CJ Pais <cj@cjpais.com>
* first cut auto ptt
* classify hold-vs-tap for presses remembered while busy
* update settings names
* use bindings instead of strings
* clean up for merge
Users who pair a third-party keyboard with a Mac see an fn-based shortcut work on the built-in keyboard and silently do nothing on the external one, with no error to explain it. The usual conclusion is that Handy is flaky.
- Explain that fn is outside the standard USB HID keyboard spec and is honored by macOS only from Apple devices, so third-party firmware never sends anything for Handy to observe
- Point multi-keyboard users at standard modifiers instead
Reported in #1925.
* drop sigusr1 on linux
Co-authored-by: Murilo Vasconcelos <muriloime@gmail.com>
* consolidate signal setup into signal_handle.rs
---------
Co-authored-by: Murilo Vasconcelos <muriloime@gmail.com>
Add a "Linux Startup Crashes or Instability" subsection to the
Troubleshooting section, with step-by-step instructions:
1. Install/reinstall gtk-layer-shell
2. Disable gtk-layer-shell via HANDY_NO_GTK_LAYER_SHELL env var
3. Disable WebKit DMA-BUF renderer
4. How to make workarounds permanent (.desktop file, shell profile)
Also add a cross-reference from the Linux Notes section.
* docs: add note about brew install not being directly maintained by devs
Added note about Homebrew cask maintenance and updated installation steps.
* fix
---------
Co-authored-by: CJ Pais <cj@cjpais.com>
* feat: add CLI parameters for Linux (--start-hidden, --no-tray, --toggle-transcription, --debug)
Add command-line interface using clap for better Linux desktop integration:
- --start-hidden: launch without showing the main window
- --no-tray: launch without system tray icon (closing window quits app)
- --toggle-transcription: toggle recording on/off on a running instance
via tauri_plugin_single_instance
- --debug: enable debug mode with Trace-level logging (runtime-only)
Extract toggle_transcription() from signal_handle.rs into a reusable
function shared between SIGUSR2 handler and CLI single-instance callback.
Update CLAUDE.md and README.md with CLI documentation including setup
instructions for GNOME, KDE Plasma, Sway/i3, and Hyprland.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* add cancel and post processs
* cleanup
* format
* docs
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: CJ Pais <cj@cjpais.com>
* feat(linux): add SIGUSR1 signal for transcribe_with_post_process
Register SIGUSR1 alongside SIGUSR2 in the signal handler so Linux
users can trigger transcription with post-processing via system
signals (e.g. `pkill -SIGUSR1 -x handy`). This mirrors the existing
SIGUSR2 toggle pattern and maps to the `transcribe_with_post_process`
action already present in ACTION_MAP.
Closes#758
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* readme
* format
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: CJ Pais <cj@cjpais.com>
* feat(models): auto-discover custom Whisper models in models directory
Enable automatic discovery of custom GGML-format Whisper models (.bin files)
placed in the models directory, so users don't need to modify source code
to use their own fine-tuned models.
Backend changes:
- Add discover_custom_whisper_models() to scan for .bin files
- Generate display names from filenames (e.g., "my-model" → "My Model")
- Skip predefined model filenames to avoid duplicates
- Add 3 unit tests for discovery logic
Frontend changes:
- Split model dropdown into 3 sections: Custom, Downloaded, Downloadable
- Add collapsible section for downloadable models to reduce clutter
- Add max-height with scroll for long model lists
- Add "Custom" badge for user-provided models
* feat(models): make custom Whisper model discovery opt-in
[why] Address maintainer concern about support burden from community
models. Custom models should be a power-user feature, not enabled by
default.
[how] Add custom_models_enabled setting (default: false) in Debug
settings. Discovery only runs when enabled. Models show "Not officially
supported" messaging. Documentation updated with enable steps.
* feat(models): add is_custom field and integrate custom models with new UI
[why]
PR review requested an explicit is_custom field instead of inferring
custom status from url === null. Custom models also need proper
integration with the new models settings page from PR #478.
[how]
- Add is_custom: bool to ModelInfo struct, set true on discovered models
- Change discover_custom_whisper_models signature from &PathBuf to &Path
- Use 0.0 sentinel scores so UI hides score bars for custom models
- Add "Custom Models" section to ModelsSettings with 3-way model split
- Show "Custom" badge in ModelCard and ModelDropdown
- Hide language/translation tags when supported_languages is empty
- Remove custom models from available_models on delete instead of
just marking as not downloaded (they have no re-download URL)
- Update tests with new fields and assertions
* chore(i18n): add custom model translation keys to all locales
[why]
Custom model feature introduces 5 new translation keys that need
to be present in all 15 non-English locales for CI to pass.
[how]
Add English placeholder values for: customModelDescription,
modelSelector.custom, settings.models.customModels,
settings.debug.customModels.label, settings.debug.customModels.description
* fix(models): keep language filter visible when no models match
[why]
The language filter was inside a conditionally rendered section
that disappeared when no downloaded models matched the selected
language, leaving the user stuck with no way to change the filter.
[how]
Always render the "Your Models" header row with the language filter,
only conditionally render the model cards below it.
* docs: fix custom models section reference in README
Model selector → Models settings page.
* fix(models): apply custom models toggle immediately without restart
[why]
Two bugs reported in PR review: (1) app breaks on restart when a
custom model was selected and the toggle is disabled — selected_model
still points to the missing model, causing "Model not found" error.
(2) Custom models remain visible in the UI after toggle-off because
the in-memory model list is never updated and no event is emitted.
[how]
- Add remove_custom_models() and add_custom_models() to ModelManager
for runtime mutation of the available_models mutex
- On disable: reset selected_model to empty if it's a custom model,
then remove custom models from the in-memory list
- On enable: run discover_custom_whisper_models against the mutex
- Emit model-state-changed event so the frontend refreshes immediately
* chore(i18n): remove "restart required" from custom model descriptions
Toggle now takes effect immediately, so the restart sentence
is inaccurate. Updated all 16 locales and README instructions.
* fix(models): clear stale model selection on startup
[why]
If a custom model file is deleted from disk while it's the selected
model, the app gets stuck on "Loading..." forever on next launch
because the model ID is not in available_models but
auto_select_model_if_needed only checked for empty string.
[how]
Validate that selected_model exists in available_models before
accepting it. If not found, clear the selection so auto-select
picks a valid downloaded model.
* remove toggle and clean up
* format
---------
Co-authored-by: CJ Pais <cj@cjpais.com>