* 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>
29 lines
753 B
Rust
29 lines
753 B
Rust
use clap::Parser;
|
|
|
|
#[derive(Parser, Debug, Clone, Default)]
|
|
#[command(name = "handy", about = "Handy - Speech to Text")]
|
|
pub struct CliArgs {
|
|
/// Start with the main window hidden
|
|
#[arg(long)]
|
|
pub start_hidden: bool,
|
|
|
|
/// Disable the system tray icon
|
|
#[arg(long)]
|
|
pub no_tray: bool,
|
|
|
|
/// Toggle transcription on/off (sent to running instance)
|
|
#[arg(long)]
|
|
pub toggle_transcription: bool,
|
|
|
|
/// Toggle transcription with post-processing on/off (sent to running instance)
|
|
#[arg(long)]
|
|
pub toggle_post_process: bool,
|
|
|
|
/// Cancel the current operation (sent to running instance)
|
|
#[arg(long)]
|
|
pub cancel: bool,
|
|
|
|
/// Enable debug mode with verbose logging
|
|
#[arg(long)]
|
|
pub debug: bool,
|
|
}
|