From 92d3362a6bf114518866dec1549ff625ba245043 Mon Sep 17 00:00:00 2001 From: Breadway Date: Mon, 24 Aug 2026 18:23:31 +0800 Subject: [PATCH] shell: add widget: entries to the builtin's [bar.slots] (Phase 3b) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reproduces breadbar's now-removed fixed Lua-widget interleave (right-of-workspaces, left/right-of-clock, left-of-stats) as explicit widget: slot entries, so the builtin theme still renders pixel-identical to today's bar under breadbar's new theme-driven widget placement. `tray` deliberately has no slot entry anywhere — it stays in the control-panel popover regardless of [bar.slots]. Updates the one test asserting the builtin's slot contents. --- bread-theme/assets/shell/liquid-motion/theme.toml | 13 ++++++++++--- bread-theme/src/shell/mod.rs | 10 ++++++++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/bread-theme/assets/shell/liquid-motion/theme.toml b/bread-theme/assets/shell/liquid-motion/theme.toml index 72a8f4d..d8bf1ec 100644 --- a/bread-theme/assets/shell/liquid-motion/theme.toml +++ b/bread-theme/assets/shell/liquid-motion/theme.toml @@ -57,9 +57,16 @@ keyboard = "none" layer = "top" [bar.slots] -left = ["workspaces"] -centre = ["media", "clock"] -right = ["volume", "wifi", "battery", "control"] +# The `widget:*` entries reproduce breadbar's pre-Phase-3b fixed Lua-widget +# interleave exactly (main.rs's now-removed widget_right_of_workspaces / +# widget_left_of_clock / widget_right_of_clock / widget_left_of_stats), so +# this manifest still renders pixel-identically to today's bar. `tray` +# deliberately has NO slot entry anywhere — it lives in the control-panel +# popover, not the bar, and is keyed directly by breadbar regardless of +# `[bar.slots]`. +left = ["workspaces", "widget:right_of_workspaces"] +centre = ["media", "widget:left_of_clock", "clock", "widget:right_of_clock"] +right = ["widget:left_of_stats", "volume", "wifi", "battery", "control"] drawer = [] [modules.workspaces] diff --git a/bread-theme/src/shell/mod.rs b/bread-theme/src/shell/mod.rs index 526b87c..a241ca9 100644 --- a/bread-theme/src/shell/mod.rs +++ b/bread-theme/src/shell/mod.rs @@ -550,8 +550,14 @@ mod tests { #[test] fn builtin_slots_and_modules_are_trail_and_flip() { let theme = resolve_builtin(); - assert_eq!(theme.slots().left, vec!["workspaces"]); - assert_eq!(theme.slots().centre, vec!["media", "clock"]); + assert_eq!( + theme.slots().left, + vec!["workspaces", "widget:right_of_workspaces"] + ); + assert_eq!( + theme.slots().centre, + vec!["media", "widget:left_of_clock", "clock", "widget:right_of_clock"] + ); assert!(matches!( theme.modules().workspaces.style, WorkspaceStyle::Trail