From b5895f068aa30f7052a1b4aa36ab4210864aa360 Mon Sep 17 00:00:00 2001 From: Candifloss Date: Thu, 11 Dec 2025 23:24:46 +0530 Subject: [PATCH] Update `--help` output - More detailed and polished. --- crates/popcorn/src/args.rs | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/crates/popcorn/src/args.rs b/crates/popcorn/src/args.rs index 425ee60..e63f703 100644 --- a/crates/popcorn/src/args.rs +++ b/crates/popcorn/src/args.rs @@ -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, - #[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, - #[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, }