From 16f42d5a827a53fe6add189abec28d13e069fbe0 Mon Sep 17 00:00:00 2001 From: Breadway Date: Wed, 2 Sep 2026 12:06:47 +0800 Subject: [PATCH] shell theme: the bar self-restarts now, soften the restart copy breadbar re-execs itself on a shell.toml 'active' change and breadbox re-reads the theme per launcher open, so a switch applies without the user doing anything. Reword the Apply card to say so and demote the 'Restart bar & launcher' button to a fallback. --- frontend/src/lib/views/ShellTheme.svelte | 8 +++----- src/src/commands/shell_theme.rs | 14 ++++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/frontend/src/lib/views/ShellTheme.svelte b/frontend/src/lib/views/ShellTheme.svelte index 75c8ce9..7965c30 100644 --- a/frontend/src/lib/views/ShellTheme.svelte +++ b/frontend/src/lib/views/ShellTheme.svelte @@ -101,13 +101,11 @@
- +
{/if} diff --git a/src/src/commands/shell_theme.rs b/src/src/commands/shell_theme.rs index aaf3e8a..94267de 100644 --- a/src/src/commands/shell_theme.rs +++ b/src/src/commands/shell_theme.rs @@ -6,12 +6,14 @@ //! //! `bread_theme::shell::list()` enumerates every discoverable theme (user //! config → system dir → compiled-in builtins). Setting `active` is a -//! non-destructive `toml_edit` write; a running breadbar picks the change -//! up live via its own `bread_theme::shell::watch()` (colours and CSS -//! tokens re-resolve without a restart). Two things it *cannot* hot-apply: -//! window-spec changes (a bottom-anchored theme like `daylight` moves the -//! bar), and breadbox — which reads `shell::load()` once at startup and has -//! no watch. `restart_shell_apps` covers both. +//! non-destructive `toml_edit` write. +//! +//! A running breadbar watches `shell.toml` (`bread_theme::shell::watch()`) +//! and, on an `active` change, re-execs itself so the full theme applies — +//! geometry and widget structure, not just CSS tokens. breadbox re-reads +//! the theme on each launcher open. So a plain write here is normally +//! enough; `restart_shell_apps` stays as a manual fallback (an old breadbar +//! without self-restart, or a failed re-exec). use serde::Serialize;