wall_rs/
lib.rs

1pub mod config;
2pub mod error;
3pub mod macros;
4pub mod source;
5pub mod wall;
6
7use clap::{Parser, Subcommand};
8use std::path::PathBuf;
9
10/// Wallpaper manager for you
11#[derive(Debug, Parser)]
12#[command(name = "wall")]
13#[command(about = "Wallpaper manager for you", long_about = None)]
14pub struct Cli {
15    #[command(subcommand)]
16    pub command: Commands,
17}
18
19#[derive(Debug, Subcommand)]
20pub enum Commands {
21    /// Set a wallpaper to your desktop
22    #[command(arg_required_else_help = true)]
23    Set {
24        /// Path to the wallpaper
25        path: PathBuf,
26    },
27
28    /// Set random picture from assets
29    Random {
30        /// Path to directory of assets
31        path: Option<PathBuf>,
32    },
33
34    /// Generate configurations and fetch assets
35    Install {
36        /// Url to fetch from assets
37        url: Option<String>,
38    },
39}