breadpaper/README.md
Breadway 0283ac4e81
All checks were successful
dev release / build (push) Successful in 21s
Honor bread.command.paper.set via breadpaper listen
Pin bread-utils to v0.7.2 (command/subscribe). Add a long-running
listen subcommand that subscribes to bread.command.paper.**, calls
set() on set, and emits bread.paper.set.done / .failed. Fail-silent
if breadd is down. No slideshow verbs. See EVENTS.md.
2026-08-15 22:47:12 +08:00

56 lines
1.6 KiB
Markdown

# breadpaper
Wallpaper setter for the bread desktop. One command sets the wallpaper
via [awww](https://github.com/heywoodlh/awww), generates a palette with
[pywal](https://github.com/dylanaraps/pywal) (`wal`), and runs
`bread-theme reload`.
It is not a wallpaper library, a slideshow daemon, or a GUI. Browsing
`~/Pictures/Backgrounds` and picking an image lives in
[bos-settings](https://git.breadway.dev/Breadway/bos-settings).
## Dependencies
Must be on `$PATH` for `set`:
- `awww` — Wayland wallpaper (`awww img`)
- `wal` — palette generation (`python-pywal`)
- `bread-theme` — theme reload (bakery package, not `breadd`)
`get` only reads the path pywal stored at `~/.cache/wal/wal`.
## Install
```
bakery install breadpaper
```
From source:
```
cargo build --release
install -Dm755 target/release/breadpaper ~/.local/bin/breadpaper
```
## Usage
```
breadpaper <path> # shorthand for `set`
breadpaper set <path> # awww + wal + bread-theme reload
breadpaper get # print the current wallpaper path
breadpaper listen # honor bread.command.paper.set (fail-silent if breadd is down)
```
Supported formats: `png`, `jpg`, `jpeg`, `webp`, `gif`, `bmp`.
## 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`; it
does not start by itself. Lua modules can still
`bread.exec("breadpaper set …")`. See [EVENTS.md](EVENTS.md).
## License
MIT — see [LICENSE](LICENSE).