| 1 | use clap::{Parser, Subcommand}; |
| 2 | #[derive(Parser, Debug)] |
| 3 | #[command(version, about)] |
| 4 | #[clap(author = "krolyxon")] |
| 5 | /// MPD client made with Rust |
| 6 | pub struct Args { |
| 7 | /// pause |
| 8 | #[clap(short, long, default_value = "false")] |
| 9 | pub pause: bool, |
| 10 | |
| 11 | /// toggle pause |
| 12 | #[arg(short, long, default_value = "false")] |
| 13 | pub toggle_pause: bool, |
| 14 | |
| 15 | /// show current status |
| 16 | #[arg(short, long, default_value = "false")] |
| 17 | pub show_status: bool, |
| 18 | |
| 19 | /// use fzf selector for selecting songs |
| 20 | #[arg(short, long, default_value = "false")] |
| 21 | pub fzf_select: bool, |
| 22 | |
| 23 | /// use dmenu selector for selecting songss |
| 24 | #[arg(short, long, default_value = "false")] |
| 25 | pub dmenu_select: bool, |
| 26 | |
| 27 | #[command(subcommand)] |
| 28 | pub command: Command, |
| 29 | } |
| 30 | |
| 31 | #[derive(Debug, Subcommand)] |
| 32 | pub enum Command { |
| 33 | #[command(arg_required_else_help = true)] |
| 34 | Volume { |
| 35 | vol: String, |
| 36 | }, |
| 37 | |
| 38 | Dmenu, |
| 39 | Fzf, |
| 40 | Status, |
| 41 | Pause, |
| 42 | Toggle, |
| 43 | } |