Initial implementation of breadpaper
CLI tool that sets a wallpaper with awww, generates a pywal colour palette, and reloads bread-theme to recolour all running bread GTK apps. Includes CI workflows, bakery metadata, and Arch PKGBUILD.
This commit is contained in:
commit
a8b38597ff
14 changed files with 548 additions and 0 deletions
17
src/wallpaper.rs
Normal file
17
src/wallpaper.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
|
||||
use anyhow::{Context, Result, bail};
|
||||
|
||||
pub fn apply(path: &Path) -> Result<()> {
|
||||
let status = Command::new("awww")
|
||||
.arg("set")
|
||||
.arg(path)
|
||||
.status()
|
||||
.context("failed to run awww — is awww-daemon running?")?;
|
||||
|
||||
if !status.success() {
|
||||
bail!("awww set exited with {}", status);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue