Added feh handler

This commit is contained in:
Benjamyn Love 2024-03-10 22:55:18 +11:00
parent d9593769c0
commit e070e55cd2
2 changed files with 13 additions and 3 deletions

View File

@ -6,12 +6,12 @@ Simple tool that selects random wallpapers and applies them as your background
Whats needed to get feature parity
- d-bus communications with Plasma [✓]
- Support for simple background engines like feh []
- Support for simple background engines like feh []
- Support for [ultrawide, horizontal, vertical] displays [✓]
What still needs to be done
- Code cleanup []
- Handler for feh []
- Handler for feh []
What I want to add

View File

@ -1,5 +1,15 @@
use crate::Wallpapers;
use std::process::Command;
pub fn change_wallpapers(wallpapers: &Wallpapers) {
println!("Not implemented");
let mut command = Command::new("/usr/bin/feh");
command.arg("--no-fehbg").arg("--bg-fill");
for monitor in wallpapers.config.monitors.monitors.iter() {
command.arg(wallpapers.random_selection(monitor).to_string());
}
let _result = command.output();
println!("{:?}", command.get_args());
}