Change option string
This commit is contained in:
@@ -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
|
||||||
|
|||||||
10
src/main.rs
10
src/main.rs
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user