Each Hyprland/GDK connector can have its own palette and stylesheet
under $XDG_RUNTIME_DIR/bread/{palettes,themes}/. GTK apps bind a
widget-level provider so two windows in one process can follow
different wallpapers. Bump workspace version to 0.7.4 for the tag.
2.5 KiB
bread-theme changelog
0.7.4
Per-output (per-monitor) theming. Session-global theme.css remains the
fallback / focused-monitor sheet; each Hyprland/GDK connector can now have
its own palette and stylesheet. BOS still keeps bg/surface/overlay/fg
fixed — only color1–6 come from the wallpaper.
On disk under $XDG_RUNTIME_DIR/bread/ (same fallback as shared_css_path):
palettes/<sanitized-output>.json— accents only (round-trips throughfrom_wal_json/ a color1–6 object; never persists pywal's light bg)themes/<sanitized-output>.css—stylesheet()for that palette
New lib API:
themes_dir,palettes_dir,output_css_path,output_palette_path,sanitize_outputload_palette_for,write_output_palette,write_output_css,write_shared_css_frompalette_from_image(isolatedwal -i, does not touch~/.cache/wal),generate_output,palette_from_jsonstylesheet_resolved— inlines@accent/@on-bg/ … to hex so GTK's display-global@define-colorcannot leak the wrong monitor's accent
GTK (gtk feature): bind_window, bind_window_with_app_css,
output_for_widget, bind_window_auto, bind_window_auto_with_app_css.
Widget-scoped providers at USER - 10 so they beat apply_shared but
lose to user CSS. Existing apply_shared / apply_app_css /
apply_css / apply_user_css are unchanged.
CLI: bread-theme generate-output <OUTPUT> --image <PATH> | --from-json <FILE> [--shared]. Does not write theme.css unless --shared.
Coordinated bump policy
bread-theme is consumed by breadbar, breadbox, breadpad, and the other
GTK bread apps as a pinned git dependency. A breaking change to Palette,
css_vars, or the gtk feature API requires dependents to bump their
Cargo.toml git tag and cut a release together. Note the impact in this file
before tagging.
0.7.4 adds per-output bind APIs (bind_window*, load_palette_for,
generate_output). Apps that call those must pin tag = "v0.7.4".
theme-v0.1.0 (2026-06-06)
- Initial extraction from
breadpad-shared/src/theme.rs Palettestruct withcolor0–color7and Catppuccin Mocha defaultload_palette()reads~/.cache/wal/colors.json, falls back to defaultcss_vars(palette)emits@define-colorblock + font declarationhex_to_rgba(hex, alpha)utilitytokensmodule with spacing scale, border radii, font sizes fromBREAD_DESIGN_SYSTEM.mdgtkfeature:apply_css()andapply_user_css()helpers for GTK4 CSS providers