Skip to content

Add SIGUSR1 signal support for transcribe_with_post_process #758

@arimxyer

Description

@arimxyer

Summary

PR #355 added a dedicated keyboard shortcut (Ctrl+Shift+Space) for transcribe_with_post_process, and the action is properly registered in the ACTION_MAP. However, the signal handler in signal_handle.rs still only maps SIGUSR2 to "transcribe". There is no signal-based way to trigger transcribe_with_post_process.

Use Case

On Linux desktop environments where Tauri's global shortcut capture doesn't work reliably (e.g., Pop!_OS, certain GNOME/Wayland setups), users rely on system-level custom keyboard shortcuts that send pkill -SIGUSR2 -x handy to trigger transcription. This is also the approach documented in the README for Sway and the approach taken by PR #572 for Wayland/GNOME integration.

Currently, these users can only trigger basic transcription via signal. There is no way to trigger transcribe_with_post_process externally, since no second signal is registered.

Proposed Solution

Add SIGUSR1 handling in signal_handle.rs, mapped to "transcribe_with_post_process":

  • SIGUSR1"transcribe_with_post_process" (transcription + AI post-processing)
  • SIGUSR2"transcribe" (basic transcription, unchanged)

This mirrors the existing SIGUSR2 implementation pattern and would allow users to set up two system-level shortcuts:

# Basic transcription
pkill -SIGUSR2 -x handy

# Transcription with post-processing
pkill -SIGUSR1 -x handy

Impact

This would also benefit PR #572 (Wayland/GNOME system shortcuts), which currently only configures SIGUSR2 for basic transcription.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions