summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs28
1 files changed, 11 insertions, 17 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 704c13f..38be6c8 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -1,15 +1,15 @@
1use clap_log_flag;
2use clap_verbosity_flag;
3use structopt; 1use structopt;
2use structopt::clap::arg_enum;
4 3
5#[derive(StructOpt, Debug)] 4#[derive(StructOpt, Debug)]
6#[structopt(raw(setting = "structopt::clap::AppSettings::ColoredHelp"))]
7/// A command-line tool to manipulate PulseAudio's equalizers 5/// A command-line tool to manipulate PulseAudio's equalizers
8pub struct Cli { 6pub struct Cli {
9 #[structopt(flatten)] 7 #[structopt(long, short, parse(from_occurrences))]
10 pub verbose: clap_verbosity_flag::Verbosity, 8 /// Pass many times for more log output
11 #[structopt(flatten)] 9 ///
12 pub log: clap_log_flag::Log, 10 /// By default, it'll only report errors and warnings. Passing `-v` one time
11 /// also prints infos, `-vv` enables debug logging, and `-vvv` trace.
12 pub verbose: u8,
13 #[structopt(subcommand)] 13 #[structopt(subcommand)]
14 pub cmd: Command, 14 pub cmd: Command,
15} 15}
@@ -61,10 +61,8 @@ pub mod pa_eq {
61 #[structopt( 61 #[structopt(
62 short = "f", 62 short = "f",
63 long = "format", 63 long = "format",
64 raw( 64 possible_values = &EqualizerConfFormat::variants(),
65 possible_values = "&EqualizerConfFormat::variants()", 65 case_insensitive = true,
66 case_insensitive = "true"
67 ),
68 default_value = "EqualizerAPO" 66 default_value = "EqualizerAPO"
69 )] 67 )]
70 /// The file format of the equalizer configuration 68 /// The file format of the equalizer configuration
@@ -84,7 +82,6 @@ pub mod pa_eq {
84 /// By default it will use the last equalized sink it finds 82 /// By default it will use the last equalized sink it finds
85 pub sink: Option<String>, 83 pub sink: Option<String>,
86 } 84 }
87
88} 85}
89 86
90#[cfg(feature = "pa-effects")] 87#[cfg(feature = "pa-effects")]
@@ -108,10 +105,8 @@ pub mod pa_effects {
108 #[structopt( 105 #[structopt(
109 short = "f", 106 short = "f",
110 long = "format", 107 long = "format",
111 raw( 108 possible_values = &EqualizerConfFormat::variants(),
112 possible_values = "&EqualizerConfFormat::variants()", 109 case_insensitive = true,
113 case_insensitive = "true"
114 ),
115 default_value = "EqualizerAPO" 110 default_value = "EqualizerAPO"
116 )] 111 )]
117 /// The file format of the equalizer configuration 112 /// The file format of the equalizer configuration
@@ -126,5 +121,4 @@ pub mod pa_effects {
126 /// Write the preset to the given file instead of the standard output 121 /// Write the preset to the given file instead of the standard output
127 pub output: Option<String>, 122 pub output: Option<String>,
128 } 123 }
129
130} 124}