summaryrefslogtreecommitdiffstats
path: root/src/command.rs
blob: 283a47eaa916f4da23c77e3ba3aebfd44e840b23 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use structopt::clap::AppSettings::*;
use structopt::StructOpt;

#[derive(StructOpt, Debug)]
#[structopt(
    rename_all = "kebab-case",
    template = "Try one of these commands:\n{subcommands}",
    raw(global_settings = "&[VersionlessSubcommands, ColorNever]",)
)]
pub enum Command {
    /// Adds url to playlist
    Add { url: String },
    /// Starts audio playback
    Play,
    /// Pauses audio playback
    Pause,
    /// Stops audio playback
    Stop,
    /// Switches to the next queue entry
    Next,
    /// Clears the playback queue
    Clear,
    /// Changes the volume to the specified value
    Volume { percent: f64 },
}