Initial commit
Some checks are pending
Build legacy Nix package on Ubuntu / build (push) Waiting to run
Some checks are pending
Build legacy Nix package on Ubuntu / build (push) Waiting to run
This commit is contained in:
commit
d77a268197
9 changed files with 443 additions and 0 deletions
27
src/main.rs
Normal file
27
src/main.rs
Normal file
|
@ -0,0 +1,27 @@
|
|||
extern crate mpd;
|
||||
|
||||
use mpd::Client;
|
||||
use std::net::TcpStream;
|
||||
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(version, about, long_about = None)]
|
||||
struct Args {
|
||||
#[arg(short, long)]
|
||||
name: String,
|
||||
#[arg(short, long)]
|
||||
count: u8,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let mut conn = Client::connect("localhost:6600").unwrap();
|
||||
|
||||
conn.volume(100).unwrap();
|
||||
println!("Status: {:?}", conn.status());
|
||||
|
||||
// let args = Args::parse();
|
||||
// for _ in 0..args.count {
|
||||
// println!("Hello {}!", args.name)
|
||||
// }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue