Compare commits

...

3 commits

Author SHA1 Message Date
Breadway
89f7a93e8a Remove CLAUDE.md (renamed to AGENTS.md)
All checks were successful
dev release / build (push) Successful in 2m30s
2026-08-15 22:04:00 +08:00
Breadway
92f2e52c1f Rename CLAUDE.md to AGENTS.md 2026-08-15 22:03:30 +08:00
Breadway
be0b54e1ea Pin ecosystem crates off floating main; bakery pulls bread
bread-theme moves to git.breadway.dev v0.7.1. bread-utils and
bread-screenshots pin ecosystem origin/main (v0.7.1 has no
BreadClient::request and predates the screenshots crate). bread-shared
pins bread v0.8.0-rc.1 — latest existing tag with widget wire types
(v0.7.0 has none; v0.8.0 was never cut).

bakery.toml sets bread_deps = ["bread"] so the daemon is installed
alongside the bar. CLAUDE.md records the single-trunk workflow and
the bar / notifications / OSD / widgets split.
2026-08-15 21:40:24 +08:00
6 changed files with 71 additions and 15 deletions

3
.gitignore vendored
View file

@ -35,6 +35,3 @@ logs/
# Internal design documents (not for distribution)
aster-brief.md
# Local hygiene notes (not for commit)
CLAUDE.md

51
AGENTS.md Normal file
View file

@ -0,0 +1,51 @@
# AGENTS.md — Repo hygiene
Scope: this file covers *repo hygiene* — branching, remotes, CI — plus a
short map of the binary. It is not user-facing project documentation.
This repo follows the branch/release workflow documented in `CONTRIBUTING.md`
— read and follow it for any git, branch, or release work here (the
single-trunk model, `feature/x`/`fix/x` branch naming, how RC tags work,
etc). Don't improvise a different workflow. The short version: there is one
long-lived branch, `main` — no `dev` or `beta` branch exists. `main`
auto-publishes a dev-track build on every push. "Beta" and "stable" are both
just tags, not branches: push a `vX.Y.Z-rc.N` tag to publish a beta-track
build, push a plain `vX.Y.Z` tag to cut the signed stable release.
"Freezing" for stabilization means pausing pushes to `main`, not moving a
branch. This replaced an earlier three-branch (`dev`/`beta`/`main`) model
after `main` was found to have silently rotted out of sync with `dev`/`beta`
across most repos in this ecosystem.
When starting work on a new feature, create branch `feature/<feature-name>`.
When working on a bug or issue, create branch `fix/<issue you are fixing>`.
## Remotes
- `origin` — Forgejo (`git.breadway.dev` via Hestia, SSH) — authoritative.
- `github` — GitHub mirror. Push `origin` only; GitHub auto-mirrors.
## CI
- `dev-release.yml` triggers on `push: branches: ['main']`.
- `rc-release.yml` triggers on `vX.Y.Z-rc.N` tag pushes (beta track).
- `release.yml` triggers on any other `v*` tag push (stable).
None of these run on plain commits or PRs beyond what's listed.
## Architecture
One GTK4/`relm4` binary, four surfaces:
| Area | Path | Role |
|---|---|---|
| Bar | `src/bar/` | Layer-shell top bar: workspaces, clock, media, stats, wifi, bluetooth, control panel + SNI tray |
| Notifications | `src/notifications/` | `org.freedesktop.Notifications` daemon + stacked popups |
| OSD | `src/osd.rs` | Volume/brightness overlay |
| Widgets | `src/widgets/` | Live Lua widgets from breadd via `BreadClient` / `WidgetSpec` |
`--screenshot` (`src/screenshot.rs`) captures those views through
`bread-screenshots`; do not rewrite it just to retarget the crate pin.
`application_id` drift vs Hyprland layer-rules/tour docs is known — leave it
unless every mention is updated in the same change.
## Don't
- Don't embed credentials in remote URLs — SSH or a credential helper only.
- Don't rewrite the widget system or `screenshot.rs` as part of pin/docs work.

16
Cargo.lock generated
View file

@ -153,7 +153,7 @@ checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
[[package]]
name = "bread-screenshots"
version = "0.3.1"
source = "git+https://git.breadway.dev/Breadway/bread-ecosystem?branch=main#f86e299f4a0ea73ff485cd84923b986ddcc8242e"
source = "git+https://git.breadway.dev/Breadway/bread-ecosystem?rev=69ce2d67a8de8a09c064aa9d7ff99b46656f0b1d#69ce2d67a8de8a09c064aa9d7ff99b46656f0b1d"
dependencies = [
"anyhow",
"bread-utils",
@ -173,19 +173,20 @@ dependencies = [
[[package]]
name = "bread-shared"
version = "0.7.0"
source = "git+https://git.breadway.dev/Breadway/bread?branch=main#b9e253074355c5f00f80e757ee8b5d2c5ac19328"
version = "0.8.0"
source = "git+https://git.breadway.dev/Breadway/bread?tag=v0.8.0-rc.1#2485e1af1f941c724461c0d59416c829ded638fe"
dependencies = [
"dirs 6.0.0",
"serde",
"serde_json",
"toml 0.8.23",
"uuid",
]
[[package]]
name = "bread-theme"
version = "0.3.1"
source = "git+https://github.com/Breadway/bread-ecosystem?branch=main#f86e299f4a0ea73ff485cd84923b986ddcc8242e"
source = "git+https://git.breadway.dev/Breadway/bread-ecosystem?tag=v0.7.1#db2fa3c4b4c1e6933bc5cf62a236d05972fdc886"
dependencies = [
"dirs 5.0.1",
"gtk4",
@ -196,9 +197,9 @@ dependencies = [
[[package]]
name = "bread-utils"
version = "0.3.1"
source = "git+https://git.breadway.dev/Breadway/bread-ecosystem?branch=main#f86e299f4a0ea73ff485cd84923b986ddcc8242e"
source = "git+https://git.breadway.dev/Breadway/bread-ecosystem?rev=69ce2d67a8de8a09c064aa9d7ff99b46656f0b1d#69ce2d67a8de8a09c064aa9d7ff99b46656f0b1d"
dependencies = [
"bread-shared 0.7.0 (git+https://git.breadway.dev/Breadway/bread?tag=v0.7.0)",
"bread-shared 0.7.0",
"dirs 5.0.1",
"serde",
"serde_json",
@ -210,7 +211,7 @@ version = "0.3.0"
dependencies = [
"anyhow",
"bread-screenshots",
"bread-shared 0.7.0 (git+https://git.breadway.dev/Breadway/bread?branch=main)",
"bread-shared 0.8.0",
"bread-theme",
"bread-utils",
"clap",
@ -1922,6 +1923,7 @@ version = "1.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239"
dependencies = [
"getrandom 0.4.3",
"js-sys",
"serde_core",
"wasm-bindgen",

View file

@ -10,15 +10,20 @@ keywords = ["wayland", "hyprland", "bar", "status-bar", "gtk4"]
categories = ["gui"]
[dependencies]
bread-theme = { git = "https://github.com/Breadway/bread-ecosystem", branch = "main", features = ["gtk"] }
bread-theme = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.7.1", features = ["gtk"] }
# Widget rendering client: bread-utils::BreadClient (emit/request/subscribe)
# for talking to breadd's IPC socket, and bread-shared purely for the
# WidgetSpec/WidgetNode wire types so we deserialize into real structs
# instead of hand-parsing serde_json::Value. See src/widgets/.
bread-utils = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", branch = "main", features = ["bread-client"] }
bread-shared = { git = "https://git.breadway.dev/Breadway/bread", branch = "main" }
# v0.7.1's BreadClient has no `request`; crate added after that tag too.
# Pin origin/main rather than inventing a tag or floating on branch = "main".
bread-utils = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", rev = "69ce2d67a8de8a09c064aa9d7ff99b46656f0b1d", features = ["bread-client"] }
# v0.7.0 has no `bread_shared::widget`; v0.8.0 was never cut. Latest
# existing tag that carries the wire types breadbar deserializes.
bread-shared = { git = "https://git.breadway.dev/Breadway/bread", tag = "v0.8.0-rc.1" }
# Capture primitives for `--screenshot` mode — see src/screenshot.rs.
bread-screenshots = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", branch = "main" }
# Same rev as bread-utils: v0.7.1 predates this crate (added 2026-07-23).
bread-screenshots = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", rev = "69ce2d67a8de8a09c064aa9d7ff99b46656f0b1d" }
gtk4 = { version = "0.11", features = ["v4_12"] }
gtk4-layer-shell = "0.8"
relm4 = { version = "0.11", features = ["macros"] }

View file

@ -141,6 +141,7 @@ Example — change the font size:
| `src/notifications/mod.rs` | `org.freedesktop.Notifications` zbus service |
| `src/notifications/popup.rs` | Layer-shell popup window and card stack |
| `src/osd.rs` | Volume/brightness on-screen display |
| `src/widgets/` | Live Lua widgets from breadd (`BreadClient` + `WidgetSpec`) |
| `src/theme.rs` | `bread-theme` palette loading, GTK CSS provider injection |
Stats are polled every 2 seconds. Bluetooth and WiFi are sampled every 16 seconds and cached in between to avoid hammering D-Bus and `iw`.

View file

@ -3,7 +3,7 @@ description = "Minimal status bar and notification daemon for Hyprland"
binaries = ["breadbar"]
system_deps = ["gtk4", "gtk4-layer-shell", "wireplumber", "pipewire-pulse", "brightnessctl", "iw"]
optional_system_deps = ["hyprland"]
bread_deps = []
bread_deps = ["bread"]
license_file = "LICENSE"
[config]