From 0a88b5b20a2c99ca53abd311cee3426afc60e794 Mon Sep 17 00:00:00 2001 From: Luke Date: Thu, 16 Apr 2020 20:16:13 +1200 Subject: [PATCH] Small fixes --- Cargo.lock | 2 +- src/aura.rs | 23 ++++++++++++----------- src/main.rs | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 592eb7ee..d40f46a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -163,7 +163,7 @@ checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac" [[package]] name = "rog-core" -version = "0.2.0" +version = "0.3.0" dependencies = [ "dbus", "gumdrop", diff --git a/src/aura.rs b/src/aura.rs index d8bca0d8..b87c7025 100644 --- a/src/aura.rs +++ b/src/aura.rs @@ -81,15 +81,12 @@ impl FromStr for Direction { } #[derive(Debug, PartialEq, Options)] -pub(crate) struct Breathe { +pub(crate) struct TwoColourSpeed { #[options(help = "print help message")] help: bool, - #[options(no_long, help = "set the first colour, must be hex string e.g, ff00ff")] + #[options(no_long, meta = "HEX", help = "set the first RGB value e.g, ff00ff")] colour: Colour, - #[options( - no_long, - help = "set the second colour, must be hex string e.g, ff00ff" - )] + #[options(no_long, meta = "HEX", help = "set the second RGB value e.g, ff00ff")] colour2: Colour, #[options(no_long, help = "set the speed: low, med, high")] speed: Speed, @@ -99,7 +96,7 @@ pub(crate) struct Breathe { pub(crate) struct SingleSpeed { #[options(help = "print help message")] help: bool, - #[options(no_long, help = "set the speed: low, med, high")] + #[options(no_long, meta = "WORD", help = "set the speed: low, med, high")] speed: Speed, } @@ -107,7 +104,7 @@ pub(crate) struct SingleSpeed { pub(crate) struct SingleColour { #[options(help = "print help message")] help: bool, - #[options(no_long, help = "set the colour, must be hex string e.g, ff00ff")] + #[options(no_long, meta = "HEX", help = "set the RGB value e.g, ff00ff")] colour: Colour, } @@ -115,7 +112,11 @@ pub(crate) struct SingleColour { pub(crate) struct SingleSpeedDirection { #[options(help = "print help message")] help: bool, - #[options(no_long, help = "set the direction: up, down, left, right")] + #[options( + no_long, + meta = "DIR", + help = "set the direction: up, down, left, right" + )] direction: Direction, #[options(no_long, help = "set the speed: low, med, high")] speed: Speed, @@ -125,7 +126,7 @@ pub(crate) struct SingleSpeedDirection { pub(crate) struct SingleColourSpeed { #[options(help = "print help message")] help: bool, - #[options(no_long, help = "set the colour, must be hex string e.g, ff00ff")] + #[options(no_long, meta = "HEX", help = "set the RGB value e.g, ff00ff")] colour: Colour, #[options(no_long, help = "set the speed: low, med, high")] speed: Speed, @@ -139,7 +140,7 @@ pub(crate) enum SetAuraBuiltin { #[options(help = "set a single static colour")] Stable(SingleColour), #[options(help = "pulse between one or two colours")] - Breathe(Breathe), + Breathe(TwoColourSpeed), #[options(help = "cycle through all colours")] Cycle(SingleSpeed), #[options(help = "rainbow cycling in one of four directions")] diff --git a/src/main.rs b/src/main.rs index f1f06577..53a481d7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,7 @@ struct CLIStart { daemon: bool, #[options(help = "client mode")] client: bool, - #[options(help = "")] + #[options(meta = "VAL", help = "")] bright: Option, #[options(command)] command: Option,