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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
pub mod config;
pub mod error;
pub mod macros;
pub mod source;
pub mod wall;

use clap::{Parser, Subcommand};
use std::path::PathBuf;

/// Wallpaper manager for you
#[derive(Debug, Parser)]
#[command(name = "wall")]
#[command(about = "Wallpaper manager for you", long_about = None)]
pub struct Cli {
    #[command(subcommand)]
    pub command: Commands,
}

#[derive(Debug, Subcommand)]
pub enum Commands {
    /// Set a wallpaper to your desktop
    #[command(arg_required_else_help = true)]
    Set {
        /// Path to the wallpaper
        path: PathBuf,
    },

    /// Set random picture from assets
    Random {
        /// Path to directory of assets
        path: Option<PathBuf>,
    },

    /// Generate configurations and fetch assets
    Install {
        /// Url to fetch from assets
        url: Option<String>,
    },
}