use clap::Parser; use color_eyre::{ eyre::{ensure, eyre}, Report, }; use std::time::Duration; use crate::{app::Content, widgets::clock::Style}; #[derive(Parser)] pub struct Args { #[arg(long, short, value_parser = parse_duration, default_value="10:00" /* 10min */, help = "Countdown time to start from. Format: 'ss', 'mm:ss', or 'hh:mm:ss'" )] pub countdown: Duration, #[arg(long, short, value_parser = parse_duration, help = "Work time to count down from. Format: 'ss', 'mm:ss', or 'hh:mm:ss'" )] pub work: Option, #[arg(long, short, value_parser = parse_duration, default_value="5:00" /* 5min */, help = "Pause time to count down from. Format: 'ss', 'mm:ss', or 'hh:mm:ss'" )] pub pause: Duration, #[arg(long, short = 'd', help = "Whether to show deciseconds or not")] pub decis: bool, #[arg( short = 'm', value_enum, help = "Mode to start with: [t]imer, [c]ountdown, [p]omodoro" )] pub mode: Option, #[arg( long, short = 's', value_enum, help = "Style to display time with: [b]old, [t]hick, [c]ross, [e]mpty" )] pub style: Option