breadpaper/src/pywal.rs
Breadway a8b38597ff
Some checks failed
Mirror to GitHub / mirror (push) Failing after 2s
Build and publish package / package (push) Failing after 1m3s
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.
2026-06-17 14:05:48 +08:00

18 lines
464 B
Rust

use std::path::Path;
use std::process::Command;
use anyhow::{Context, Result, bail};
pub fn generate(path: &Path) -> Result<()> {
let status = Command::new("wal")
.arg("-i")
.arg(path)
.arg("-n") // skip wal's own wallpaper backend; awww already set it
.status()
.context("failed to run wal — is python-pywal installed?")?;
if !status.success() {
bail!("wal exited with {}", status);
}
Ok(())
}