bread-ecosystem/bread-theme/src
Breadway c7c579bf04 bread-theme: make sanitize_output injective (percent-encode)
The old sanitiser mapped '/', ':' and space -- and every other unsafe
byte -- all to '_', so "a/b" and "a:b" both became "a_b" and silently
shared one palettes/<name>.json + themes/<name>.css, last writer wins.
No collision detection at all.

Percent-encode every byte outside [A-Za-z0-9._-] as %XX instead. That is
injective, so two connectors can never land on the same file. '%' itself
isn't in the keep-set so it encodes to %25 and the mapping stays
reversible in principle (nothing decodes today -- reload_binds_for_
sanitized only compares sanitize_output(name) against the on-disk stem).

Real Hyprland connectors (eDP-1, HDMI-A-1, DP-2) are already only
keep-set bytes, so their filenames are unchanged; the files are
session-scoped under XDG_RUNTIME_DIR and regenerated at login anyway.
2026-09-01 16:28:05 +08:00
..
bin bread-theme/bread-utils: XDG env hardening and safer temp-file writes 2026-08-31 15:37:52 +08:00
shell shell themes: add Daylight — bottom-anchored, segmented, light builtin 2026-08-31 15:15:36 +08:00
adw.rs bread-theme: add libadwaita components + fix slider/chip theming gaps 2026-07-29 22:45:18 +08:00
anim.rs bread-theme: clamp spring_to's interpolated value to [from,to] 2026-08-31 15:15:36 +08:00
gtk.rs Clear clippy 1.97 lints across bread-theme, bread-utils, bread-polkit 2026-08-31 15:20:15 +08:00
layerrules.rs bread-theme/bread-utils: XDG env hardening and safer temp-file writes 2026-08-31 15:37:52 +08:00
lib.rs bread-theme: strip @define-color from stylesheet_resolved 2026-09-01 16:27:58 +08:00
output.rs bread-theme: make sanitize_output injective (percent-encode) 2026-09-01 16:28:05 +08:00
palette.rs Add per-output palettes and window-scoped theme binding 2026-08-16 13:20:00 +08:00