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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
use Path;
use Command;
use cratepath;
/// Load the wallpaper, running the corresponding call to `hyprpaper reload`.
///
/// # Parameters
///
/// * `monitor_name` - A string reference, which defines the monitor that must
/// receive the wallpaper update. The value * will be
/// translated to the hyprpaper wildcard empty string token.
/// * `wallpaper` - A Path object, which references the path to the wallpaper
/// to apply. It MUST be conform to hyprpaper standards (be an
/// absolute path, be valid).
///
/// # Return
///
/// A Result object. Ok contains nothing, while Error contains the error
/// specified as a String.
/// Apply the wallpaper over the specified monitor.
///
/// The wallpaper MUST reference a valid path to be able to run the hyprpaper
/// command. If it isn't, the function will return an error on call. The method
/// takes care to expand the path in a way similar to bash if necessary (HOME,
/// environment variables...). If it can't, the method will also return an
/// error.
///
/// To match the hyprpaper API, monitor values which doesn't reference any
/// monitor detected by Hyprland will not lead to an error and will be applied
/// within hyprpaper.
///
/// This processed is done using the hyprctl CLI as a middleware between
/// hypryaml and the Hyprpaper socket.
///
/// # Arguments
///
/// * `monitor_name` - A string reference, which defines the monitor that must
/// receive the wallpaper update. The value * will be
/// translated to the hyprpaper wildcard empty string token.
/// * `wallpaper_path` - A string reference, which references the path of the
/// wallpaper. It can use bash-expanded values, like the
/// HOME tilde and environment variables.
///
/// # Return
///
/// A Result object. Ok contains nothing, while Error contains the error
/// specified as a String.