From 96fa79c1d4e26c1dadc76fb89dde19fb7040d32e Mon Sep 17 00:00:00 2001 From: Breadway Date: Mon, 24 Aug 2026 23:13:22 +0800 Subject: [PATCH] shell theme: add glass-workbench as a second compiled-in theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 5 of the shell theme system (THEME_SYSTEM_PLAN.md §11): a second builtin, demo 02's flush edge-to-edge bar with pill workspaces, a plain date+time clock, and cpu/ram chips instead of the media widget. - bread-theme/assets/shell/glass-workbench/: theme.toml + CSS template, faithful to bos-ui-demos/02-glass-workbench.html. Accent maps to the `green` palette token (flat, not a gradient) rather than a hex literal, so pywal theming still works. - builtin.rs: generalized from a single hardcoded liquid-motion constant pair to a small BuiltinTheme registry (builtin::ALL / builtin::find), so mod.rs's discovery/list()/resolve_builtin no longer special-case one id. liquid-motion stays the pinned fallback in resolve_builtin(). - manifest.rs: KNOWN_MODULES gains "cpu"/"ram". - types.rs: new Tokens::bar_border() ("full" default vs "bottom") so a flush bar can ask for a single hairline instead of an island's full border. - Tests: builtin loads, appears in list() alongside liquid-motion, and its window spec is the flush/edge shape (36px, zero margin, radius 0). cargo test -p bread-theme --lib: 63 passing (59 prior + 4 new). --- .../shell/glass-workbench/glass-workbench.css | 86 +++++++++ .../assets/shell/glass-workbench/theme.toml | 169 ++++++++++++++++++ bread-theme/src/shell/builtin.rs | 78 ++++++-- bread-theme/src/shell/manifest.rs | 5 + bread-theme/src/shell/mod.rs | 159 +++++++++++++--- bread-theme/src/shell/types.rs | 10 ++ 6 files changed, 467 insertions(+), 40 deletions(-) create mode 100644 bread-theme/assets/shell/glass-workbench/glass-workbench.css create mode 100644 bread-theme/assets/shell/glass-workbench/theme.toml diff --git a/bread-theme/assets/shell/glass-workbench/glass-workbench.css b/bread-theme/assets/shell/glass-workbench/glass-workbench.css new file mode 100644 index 0000000..f34f33a --- /dev/null +++ b/bread-theme/assets/shell/glass-workbench/glass-workbench.css @@ -0,0 +1,86 @@ +/* CSS template for the glass-workbench builtin (bread-theme/src/shell/ + * builtin.rs). Same scope and substitution rules as liquid-motion.css: only + * the window/workspace/clock chrome the manifest's own concepts model, `{name}` + * tokens substituted, `@name` palette references passed through untouched. + * + * Source: bos-ui-demos/02-glass-workbench.html's