Change option string

This commit is contained in:
Lennard Kittner
2026-02-26 18:53:05 +01:00
parent 79005fec41
commit 89ae29fa42
2 changed files with 6 additions and 8 deletions

View File

@@ -167,8 +167,8 @@ Usage: hyper_headset [OPTIONS]
Options: Options:
--refresh_interval <refresh_interval> --refresh_interval <refresh_interval>
Set the refresh interval (in seconds) [default: 3] Set the refresh interval (in seconds) [default: 3]
--press_mute_key_on_headset_mute <press_mute_key_on_headset_mute> --press_mute_key <press_mute_key>
The app will simulate pressing the microphone key whoever the headsets is muted or unmuted. [default: true] [possible values: true, false] The app will simulate pressing the microphone mute key whoever the headsets is muted or unmuted. [default: true] [possible values: true, false]
-h, --help -h, --help
Print help Print help
-V, --version -V, --version

View File

@@ -20,10 +20,10 @@ fn main() {
.value_parser(clap::value_parser!(u64)), .value_parser(clap::value_parser!(u64)),
) )
.arg( .arg(
Arg::new("press_mute_key_on_headset_mute") Arg::new("press_mute_key")
.long("press_mute_key_on_headset_mute") .long("press_mute_key")
.required(false) .required(false)
.help("The app will simulate pressing the microphone key whoever the headsets is muted or unmuted.") .help("The app will simulate pressing the microphone mute key whoever the headsets is muted or unmuted.")
.default_value("true") .default_value("true")
.value_parser(clap::value_parser!(bool)), .value_parser(clap::value_parser!(bool)),
) )
@@ -31,9 +31,7 @@ fn main() {
let mut enigo = Enigo::new(&Settings::default()).unwrap(); let mut enigo = Enigo::new(&Settings::default()).unwrap();
let refresh_interval = *matches.get_one::<u64>("refresh_interval").unwrap_or(&3); let refresh_interval = *matches.get_one::<u64>("refresh_interval").unwrap_or(&3);
let press_mute_key = *matches let press_mute_key = *matches.get_one::<bool>("press_mute_key").unwrap_or(&true);
.get_one::<bool>("press_mute_key_on_headset_mute")
.unwrap_or(&true);
let refresh_interval = Duration::from_secs(refresh_interval); let refresh_interval = Duration::from_secs(refresh_interval);
let tray_handler = TrayHandler::new(StatusTray::new()); let tray_handler = TrayHandler::new(StatusTray::new());
loop { loop {