Commit graph

6 commits

Author SHA1 Message Date
Breadway
fa0597f482 bread-theme: register as a bakery-managed product
Some checks failed
Mirror to GitHub / mirror (push) Successful in 1s
release bread-theme / build (push) Failing after 13s
Build and publish package / package (push) Successful in 1m9s
Was previously an unmanaged binary baked into /etc/skel — never updated by
bakery or pacman, which is why fresh BOS installs (and existing ones) kept
regenerating the shared theme.css with the pre-fix pywal-driven background
even after bos-settings itself shipped the fix.
2026-07-16 19:02:02 +08:00
Breadway
17d1bb8580 bread-theme: pin background/surface/overlay/foreground, only accents follow pywal
All checks were successful
Mirror to GitHub / mirror (push) Successful in 1s
Build and publish package / package (push) Successful in 58s
A light or muddy-toned wallpaper (e.g. an all-beige photo) makes pywal hand
back a light or off-hue background/surface slot, and every bread GUI's
panels inherited it directly — the app stopped looking like a dark BOS tool
and started looking like whatever colour the wallpaper happened to be.

background/foreground/color0(surface)/color7(overlay) are now fixed BOS
dark-theme constants, never read from pywal's special/colors blocks. Only
color1-6 (the actual accent slots) still track the wallpaper via pywal, which
is the feature breadpaper is for.
2026-07-03 22:46:40 +08:00
Breadway
5e58558dd3 bread-theme 0.2.8: fix live reload — watch the dir, not the file
Some checks failed
Mirror to GitHub / mirror (push) Successful in 2s
Build and publish package / package (push) Failing after 1m54s
The stylesheet is written with write-tmp-then-rename (atomic), which replaces the
inode. A monitor on the file itself caught the first replace then went deaf
(inotify reports DELETE_SELF and never re-arms), so `bread-theme reload` updated
the file but no running GUI ever recoloured. Monitor the parent directory and
filter for the stylesheet filename instead — that fires on every reload. Verified
against a real atomic-rename write (event arrives as Renamed with the new name in
other_file, so match both file and other_file).
2026-06-17 12:53:35 +08:00
Breadway
0494650805 bread-theme 0.2.7: luminance-picked ink + live reload
Some checks failed
Mirror to GitHub / mirror (push) Successful in 2s
Build and publish package / package (push) Failing after 1m46s
Readability: pywal can emit a light value in any palette slot, and the shared
sheet assumed dark backgrounds (white text), so text vanished on light surfaces/
accents. Add ink_on() — a WCAG-luminance pick of near-black/near-white per
background — exposed as @on-bg/@on-surface/@on-accent/@on-red/@on-overlay. The
component sheet now sets colour on containers and lets labels inherit (de-emphasis
via opacity), dropping the blanket `label { color }` rule that overrode
coloured-background text. pywal hues are untouched.

Hot reload: add gtk::apply_app_css(closure) — applies an app's own CSS now and
re-runs the closure whenever the shared theme file is rewritten, so apps recolour
in place. New `bread-theme reload` verb rewrites the file (atomic rename trips
every running GUI's monitor) — the command to run after changing pywal colours.
2026-06-17 12:35:03 +08:00
Breadway
8305b4a58b bread-theme: shared component stylesheet + generator CLI
Adds the single source of truth for bread GUI styling so the apps stop
each re-implementing (and drifting on) component CSS:

- stylesheet(&Palette): full component sheet (buttons, entries, switches,
  dropdowns, lists/rows/sidebars, cards, chips, scrollbars, headings) built
  from the design tokens + a canonical @define-color block (surface=color0,
  overlay=color7, accent=color4).
- render() / shared_css_path() / write_shared_css(): render for the current
  pywal palette and write to $XDG_RUNTIME_DIR/bread/theme.css.
- gtk::apply_shared(): load that file (or a rendered fallback) at APPLICATION
  priority and watch it, so every app recolours live with no rebuild.
- new `bread-theme` CLI (generate|path|print) — gtk-free, light. Run at
  session start and on palette change; apps pick it up via the file watch.

The contract is a CSS *file*, so apps stay decoupled from this crate's gtk4
version. Tests cover the stylesheet, path, and render helpers.
2026-06-16 16:43:09 +08:00
Breadway
6c5536733f Init commit 2026-06-06 13:26:48 +08:00