Initial implementation of breadpaper
Some checks failed
Mirror to GitHub / mirror (push) Failing after 2s
Build and publish package / package (push) Failing after 1m3s

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:
Breadway 2026-06-17 14:05:48 +08:00
commit a8b38597ff
14 changed files with 548 additions and 0 deletions

36
src/main.rs Normal file
View file

@ -0,0 +1,36 @@
use std::path::PathBuf;
use std::process;
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(name = "breadpaper", about = "Wallpaper manager for the bread desktop")]
struct Cli {
#[command(subcommand)]
command: Command,
}
#[derive(Subcommand)]
enum Command {
/// Set wallpaper, generate pywal palette, and reload bread themes
Set {
/// Path to the image file
path: PathBuf,
},
/// Print the current wallpaper path
Get,
}
fn main() {
let cli = Cli::parse();
let result = match cli.command {
Command::Set { path } => breadpaper::set(&path),
Command::Get => breadpaper::get().map(|p| println!("{}", p.display())),
};
if let Err(e) = result {
eprintln!("error: {e:#}");
process::exit(1);
}
}