Update --help output
- More detailed and polished.
This commit is contained in:
parent
0ce8f9147c
commit
b5895f068a
@ -1,15 +1,39 @@
|
||||
use clap::Parser;
|
||||
use clap::{Parser, ValueHint};
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(name = "popcorn", version, about = "Minimal OSD popup renderer")]
|
||||
#[command(
|
||||
name = "popcorn",
|
||||
version,
|
||||
about = "Minimal OSD popup renderer",
|
||||
long_about = "Minimal, configurable on-screen display popup.\n\
|
||||
Called by other programs or keybindings to show volume, brightness, and battery level popups."
|
||||
)]
|
||||
pub struct CliArgs {
|
||||
#[arg(long = "value")]
|
||||
/// Percentage value to display (0 to 100). Usually volume or brightness.
|
||||
#[arg(
|
||||
long = "value",
|
||||
value_name = "PERCENT",
|
||||
help = "Percentage value for the OSD (0 to 100)",
|
||||
value_hint = ValueHint::Other
|
||||
)]
|
||||
pub value: Option<u8>,
|
||||
|
||||
#[arg(long = "icon")]
|
||||
/// Icon glyph to display. Usually provided by a Nerd Font.
|
||||
#[arg(
|
||||
long = "icon",
|
||||
value_name = "GLYPH",
|
||||
help = "Icon glyph (UTF-8). If omitted, config default is used",
|
||||
value_hint = ValueHint::Other
|
||||
)]
|
||||
pub icon: Option<String>,
|
||||
|
||||
#[arg(long = "color")]
|
||||
/// Fill color in AARRGGBB hex format.
|
||||
#[arg(
|
||||
long = "color",
|
||||
value_name = "AARRGGBB",
|
||||
help = "Fill color in hex (AARRGGBB). If omitted, config default is used",
|
||||
value_hint = ValueHint::Other
|
||||
)]
|
||||
pub color: Option<String>,
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user