bread-theme: write terminal colour sequences from the palette #32

Closed
opened 2026-09-26 12:29:25 +08:00 by Breadway · 3 comments
Owner

BOS's skel .zshrc cats ~/.cache/wal/sequences to colour terminals. Only wal writes that file, so after the switch terminals would silently keep stale colours.

  • bread-theme writes its own sequences file (OSC 4 for the 16 slots, OSC 10/11/12 for fg/bg/cursor) at a bread-owned path whenever the global palette is written.
  • Consider also emitting a kitty include-able colours file.
  • Side benefit: terminals get the fixed BOS dark bg like the GTK apps, instead of pywal's raw wallpaper-derived bg (current mismatch).

Part of epic PYWAL.

BOS's skel `.zshrc` cats `~/.cache/wal/sequences` to colour terminals. Only `wal` writes that file, so after the switch terminals would silently keep stale colours. - bread-theme writes its own sequences file (OSC 4 for the 16 slots, OSC 10/11/12 for fg/bg/cursor) at a bread-owned path whenever the global palette is written. - Consider also emitting a kitty `include`-able colours file. - Side benefit: terminals get the fixed BOS dark bg like the GTK apps, instead of pywal's raw wallpaper-derived bg (current mismatch). Part of epic PYWAL.
Author
Owner

PR: #36

write_global_palette now also writes sequences_path() (OSC 4 for 16 ANSI slots + OSC 10/11/12 for fg/bg/cursor) so BOS's skel .zshrc keeps working without wal. Kitty-specific colours file was considered but not added (OSC sequences already cover kitty); noted as a possible follow-up if actually needed.

PR: https://git.breadway.dev/Breadway/bread-ecosystem/pulls/36 write_global_palette now also writes sequences_path() (OSC 4 for 16 ANSI slots + OSC 10/11/12 for fg/bg/cursor) so BOS's skel .zshrc keeps working without wal. Kitty-specific colours file was considered but not added (OSC sequences already cover kitty); noted as a possible follow-up if actually needed.
Author
Owner

Reviewed on bread-ecosystem#36. This part is good: sequences_path() = $XDG_CACHE_HOME/bread/sequences, with OSC 4 for 0..15 and OSC 10/11/12, tested. BOS .zshrc cats $HOME/.cache/bread/sequences, which matches when XDG_CACHE_HOME is unset; bos#52 has a nit about honouring it. Not merged, because it ships in the same PR as ECO-29/30, which need rework. Left in review.

Reviewed on bread-ecosystem#36. This part is good: `sequences_path()` = `$XDG_CACHE_HOME/bread/sequences`, with OSC 4 for 0..15 and OSC 10/11/12, tested. BOS .zshrc cats `$HOME/.cache/bread/sequences`, which matches when XDG_CACHE_HOME is unset; bos#52 has a nit about honouring it. Not merged, because it ships in the same PR as ECO-29/30, which need rework. Left in review.
Author
Owner

Second-round review: ready. write_global_palette writes sequences next to palette.json: OSC 4 for 16 slots with 8-15 mirroring 0-7, then OSC 10/11/12, ST-terminated. The test asserts the exact escape strings. The path matches what bos#52's skel .zshrc cats, including the XDG_CACHE_HOME case. This stays in review because it lands with bread-ecosystem#36 (release-sensitive repo, currently held for the ECO-30 fix).

Second-round review: ready. `write_global_palette` writes `sequences` next to `palette.json`: OSC 4 for 16 slots with 8-15 mirroring 0-7, then OSC 10/11/12, ST-terminated. The test asserts the exact escape strings. The path matches what bos#52's skel `.zshrc` cats, including the `XDG_CACHE_HOME` case. This stays in review because it lands with bread-ecosystem#36 (release-sensitive repo, currently held for the ECO-30 fix).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/bread-ecosystem#32
No description provided.