rwpspread 0.5.1

Multi-Monitor Wallpaper Spanning Utility
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::collections::HashMap;

pub struct Swaybg;
impl Swaybg {
    /// Generate and return a new swaybg argument
    pub fn new(wallpapers: &HashMap<String, String>) -> Result<Vec<&str>, String> {
        let mut arguments: Vec<&str> = Vec::new();
        for paper in wallpapers {
            arguments.push(&"-o");
            arguments.push(&paper.0);
            arguments.push(&"-i");
            arguments.push(&paper.1);
        }

        Ok(arguments)
    }
}