GTK4 control panel for BOS (Bread Operating System)
keybinds.rs was built only against a personal multi-layout binds.json schema (globals/common/layouts). Loading the real BOS-shipped flat schema (default_mods/bindings, with per-bind label/category/demo_cmd breadhelp depends on) into that model and saving silently dropped the bindings key -- still valid JSON, so the Lua pcall failsafes never caught it. - Add SchemaKind (Flat/MultiLayout/Unknown), detected from the file's top-level keys at load time and pinned for the session so save() always emits the same shape it read. - Flat mode hides the layout-switching UI (there's nothing to switch) and edits a single Bindings list; MultiLayout keeps today's UI unchanged. - Bind's #[serde(flatten)] extra map already preserved label/category/ demo_cmd/options across a round trip; changed `mods` from Vec<String> to Option<Vec<String>> so an explicit "mods": [] (media keys pinning "no modifiers") isn't collapsed into "field omitted -> falls back to default_mods" -- a real behavior-changing loss the old round trip had. - Unknown schema refuses to save (visible status-label error) instead of guessing a shape and overwriting the file. - New round-trip tests in keybinds.rs load a real BOS-shaped binds.json fixture through load -> save and assert the bindings key and every per-bind extra field survive untouched; this is the regression test that would have caught the original bug. Also: config writes across the app (TOML via config::save_doc, and the JSON views -- autostart, appearance/settings.json, hyprland.rs/ monitors.json, breadbar's CSS) now go through a shared config::atomic_write: write to a temp file in the same directory, rename over the target, and back up whatever was there first to <path>.bak. A crash or disk-full mid-write can no longer leave a config truncated or corrupted with no way back. |
||
|---|---|---|
| .forgejo/workflows | ||
| packaging | ||
| src | ||
| .gitignore | ||
| bakery.toml | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
bos-settings
System settings app for BOS (Bread Operating System) — GTK4, configures every bread* app's config plus core system settings (network, sound, power, users, firewall, snapshots, packages, AUR, firmware, Hyprland display/appearance/autostart) non-destructively.
Split out of the bos repo into its own repo so a bos-settings release doesn't require a BOS ISO release, and vice versa. Still the only pacman-packaged (not bakery-managed) bread app — see packaging/README.md.
Building
cargo build --release
Packaging / releasing
See packaging/README.md. In short: bump Cargo.toml's version, tag vX.Y.Z, push the tag to both remotes — .forgejo/workflows/package.yml builds and publishes to the [breadway] pacman repo automatically.