summaryrefslogtreecommitdiffstats
path: root/src/command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/command.rs')
-rw-r--r--src/command.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/command.rs b/src/command.rs
new file mode 100644
index 0000000..283a47e
--- /dev/null
+++ b/src/command.rs
@@ -0,0 +1,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 },
+}