Stop shelling out to pywal; use bread-theme's native extractor #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Depends on the bread-theme release from epic PYWAL.
src/pywal.rs;generate_palettegoes away.set(): extract the palette once via bread-theme, write the global palette (new bread-owned cache) plus per-output files. Removes the current re-read of~/.cache/walviaload_palette().sync_focused_global(): write the global palette from the per-output palette it already has instead of re-runningwal -i(removes the double extraction).get(): read the last wallpaper fromcurrent.jsoninstead of~/.cache/wal/wal.python-pywalfrombakery.tomlsystem_deps; update bakery description, README, EVENTS.md.Part of epic PYWAL.
PR: #6
Deleted src/pywal.rs, set()/sync_focused_global() now use bread-theme's native palette_from_image + write_global_palette instead of shelling to wal, get() reads current.json. bread-theme dep points at feature/native-palette for now (needs the release tag before merge). Verified build/test/clippy/fmt against a temporary local override of the in-progress bread-theme worktree, then reverted the override.
Review: changes requested on breadpaper#6 (#6). Not merged: it depends on unreleased bread-theme.
--locked. After the bread-theme release, re-point to the tag and commit a regenerated lock.set()rebuilds theme.css through the externalbread-theme reloadbinary. An older installed CLI would read the stale~/.cache/walcache. Write the shared sheet in-process withtheme::write_shared_from(&palette), assync_focused_globalalready does.set()applies the wallpaper before extraction fails, which leaves half-applied state.The get() precedence (focused output, then "*", then first entry) is fine.
Rework happens on the existing branch feature/drop-pywal, and PR #6 stays open. Do not open a second PR for this key.
Pushed follow-up commit to feature/drop-pywal addressing all 4 review points: in-process shared stylesheet write (theme::write_shared_from) replacing the bread-theme reload shell-out, palette extraction moved before wallpaper application in both set() and set_on() to avoid half-applied state, resolve_current() extracted with 4 new precedence tests, and the stale awww/wal comment fixed. Also refreshed Cargo.lock against the now-pushed feature/native-palette branch and verified cargo build --locked in a fresh clone.
Verified: cargo build --release, cargo test --release (32 passed), cargo clippy --all-targets -- -D warnings, cargo fmt --check, all clean.
PR: #6
Follow-up: refreshed Cargo.lock again to bread-theme's latest feature/native-palette commit (3758f0c) since the branch received new commits after the earlier refresh. Re-verified in a fresh clone: cargo build --release, cargo test --release (32 passed), clippy, fmt, all clean. Issue stays in review, no other changes.
Second-round review: the round-1 items are resolved (extract-before-apply in set(), in-process shared sheet, get() precedence tests, stale comment), and CI is green. Two small changes remain, plus the relock. Full review: #6
src/lib.rs:146-157(set_on): per-output palette/css files are written bygenerate_for_outputbeforewallpaper::apply_on. If awww fails, the monitor recolours without the wallpaper changing. Change the order to:bread_theme::palette_from_image, thenapply_on, thenwrite_output_theme(output, &palette).README.md:19still says bread-theme must be on $PATH forset. It no longer is.Cargo.toml:15to the release tag and commit the regenerated Cargo.lock. The branch pin will break once #36 merges and its branch is deleted.For the user: breadpaper now statically links ImageMagick- and IJG-derived code but still declares MIT only. See the licensing notes on bread-ecosystem#36.
Rework happens on the existing branch feature/drop-pywal, and PR #6 stays open. Do not open a second PR for this key.
Pushed round-3 fixes to feature/drop-pywal, PR: #6
set_on now extracts (no side effects) before applying the wallpaper, writes per-output theme files only after apply_on succeeds. README.md:19 stale PATH line dropped. Enabled bread-theme's extract feature (its licensing split moved palette_from_image/generate_output behind it); added NOTICE, LICENSE-ImageMagick, LICENSE-libjpeg-turbo, a breadpaper notice subcommand, and a README licence note since this binary now statically links ImageMagick/IJG code. Relocked against bread-theme's latest feature/native-palette commit.
Verified: cargo build --locked, cargo test --locked (32 passed), clippy -D warnings, fmt --check, all clean.
Third-round review of PR #6 (
f835da5): changes requested. Full review: #6 (comment)license_file, release.yml:44). Make it a combined MIT + NOTICE + ImageMagick + IJG text, as bread-theme does, so the IJG statement and the ImageMagick licence and NOTICE go out with the binary.branch = "feature/native-palette"to the tag that ships bread-ecosystem#36, keepingfeatures = ["gtk", "extract"], and relock. Main's check.yml now runs lint-pins, which rejects branch pins.The set_on ordering fix and the README fix are good. Rebased and built against a rebased #36: clippy is clean and 32 tests pass.
Rework happens on the existing branch
feature/drop-pywal, and PR #6 stays open. Do not open a second PR for this key.