Fixed bug related to JS ordering causing wallpaper to select incorrect screen

This commit is contained in:
benjamyn committed 2024-12-05 16:25:54 +11:00
1 parent 77824176f6
commit 8200a1f764
4 files changed
+34 -7

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ pub fn change_wallpapers(wallpapers: &Wallpapers) {
command.arg("--no-fehbg").arg("--bg-fill");
for monitor in wallpapers.config.monitors.monitors.iter() {
command.arg(wallpapers.random_selection(monitor).to_string());
command.arg(wallpapers.random_selection(&monitor.ratio).to_string());
}
let result = command.output();
+3 -2
View File
@@ -39,10 +39,11 @@ pub fn generate_js(wallpapers: &Wallpapers) -> String {
allDesktops[{0}].currentConfigGroup = Array('Wallpaper', 'org.kde.image', 'General');
allDesktops[{0}].writeConfig('Image', 'file://{1}');
",
count,
wallpapers.random_selection(monitor)
monitor.index,
wallpapers.random_selection(&monitor.ratio)
);
javascript.push_str(&boilerplate);
}
println!("{}", javascript);
javascript
}