feat(cli): arg --menu (#37)
- Add `--menu` to args - Add `--version` to args - Change default behavior: At a first run of the app, the menu will be shown by default (similar to what @tschinz suggested in #33). However, if an user hides the menu later and closes the app, the menu will be hidden again with a next start. Just because the app restores the last app state.
This commit is contained in:
@@ -8,6 +8,7 @@ use std::time::Duration;
|
||||
use crate::common::{Content, Style};
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(version)]
|
||||
pub struct Args {
|
||||
#[arg(long, short, value_parser = parse_duration,
|
||||
help = "Countdown time to start from. Formats: 'ss', 'mm:ss', or 'hh:mm:ss'"
|
||||
@@ -33,6 +34,9 @@ pub struct Args {
|
||||
#[arg(long, short = 's', value_enum, help = "Style to display time with.")]
|
||||
pub style: Option<Style>,
|
||||
|
||||
#[arg(long, value_enum, help = "Whether to open the menu or not.")]
|
||||
pub menu: bool,
|
||||
|
||||
#[arg(long, short = 'r', help = "Reset stored values to default.")]
|
||||
pub reset: bool,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user