Focused-monitor set_on (audit #5): set_on generated the focused output's palette and rewrote the shared theme.css but never touched ~/.cache/wal/colors.json. Apps rebuild their own CSS from load_palette() (that file) when theme.css changes, so straight after a focused set_on the shared sheet showed the new palette while every app's own chrome kept the old one. The focused path now also runs a global wal -i (via sync_focused_global), matching what set() already does; restore_one's focused branch gets the same treatment. set() redundancy and staleness (audit #7): - Reuse the palette the global wal -i just wrote instead of re-running an isolated wal -i once per output for an identical result. - Write palettes/<out>.json + themes/<out>.css for every compositor- connected output, not just those already in current.json, so a later-connected monitor still gets its files. - Prune current.json entries and per-output palette/css files for monitors that are no longer connected. Pruning only runs off a Hyprland-authoritative output list, never the awww fallback or an empty result. Adds Current::remove_output and unit tests for the stale-output selection. |
||
|---|---|---|
| .forgejo/workflows | ||
| .github/workflows | ||
| ci | ||
| packaging | ||
| src | ||
| .gitignore | ||
| AGENTS.md | ||
| bakery.toml | ||
| Cargo.lock | ||
| Cargo.toml | ||
| config.example.toml | ||
| CONTRIBUTING.md | ||
| EVENTS.md | ||
| LICENSE | ||
| README.md | ||
breadpaper
Wallpaper setter for the bread desktop. One command sets the wallpaper
via awww, generates a palette with
pywal (wal), and runs
bread-theme reload. Two monitors can keep different wallpapers (and
per-output bread-theme files); the last path per output is stored in
~/.config/breadpaper/current.json.
set / get / apply stay one-shot CLI. breadpaper library (alias
browse) opens a GTK picker over the wallpaper directories. It is not
a slideshow daemon.
Dependencies
Must be on $PATH for set:
awww— Wayland wallpaper (awww img)wal— palette generation (python-pywal)bread-theme— theme reload (bakery package, notbreadd)
library also needs GTK4 (the window loads bread-theme's shared
stylesheet and follows the monitor it sits on). get without
--output still reads the path pywal stored at ~/.cache/wal/wal.
get --output NAME reads ~/.config/breadpaper/current.json.
Install
bakery install breadpaper
From source:
cargo build --release
install -Dm755 target/release/breadpaper ~/.local/bin/breadpaper
Usage
breadpaper <path> # shorthand for `set` (all outputs)
breadpaper <path> --output NAME # one output
breadpaper set <path> # awww + wal + bread-theme reload (all)
breadpaper set <path> --output NAME
breadpaper get # print ~/.cache/wal/wal
breadpaper get --output NAME # path from current.json
breadpaper apply # restore current.json
breadpaper library # GTK picker (alias: browse)
breadpaper library --dir PATH # also scan PATH (repeatable)
breadpaper listen # honor bread.command.paper.set / .library
Supported formats: png, jpg, jpeg, webp, gif, bmp.
Library
breadpaper library scans these directories (missing ones are skipped):
~/Pictures/Wallpapers/usr/share/backgrounds/bos
Override the list in ~/.config/breadpaper/config.toml:
library_dirs = [
"~/Pictures/Wallpapers",
"/usr/share/backgrounds/bos",
]
BREADPAPER_LIBRARY_DIRS (colon-separated) overrides the file. --dir
appends extra roots for that invocation. Clicking a thumbnail applies
to the monitor the picker is on (set --output); if the output cannot
be resolved it falls back to all outputs.
Bread events
After a successful set, breadpaper emits bread.paper.changed if
breadd is running (silent no-op if it isn't). breadpaper listen is
the optional long-running subscriber for bread.command.paper.set and
bread.command.paper.library; it does not start by itself. Lua modules
can still bread.exec("breadpaper set …") or
bread.exec("breadpaper library"). See EVENTS.md.
License
MIT — see LICENSE.