diff --git a/bread-launcher/src/lib.rs b/bread-launcher/src/lib.rs index 182900f..9f7fe31 100644 --- a/bread-launcher/src/lib.rs +++ b/bread-launcher/src/lib.rs @@ -9,7 +9,10 @@ //! //! Every path/cache/history entry point here takes an explicit `app: &str` //! rather than hardcoding an app name, so more than one host can use this -//! crate without colliding — see [`cache_dir`]/[`config_dir`]. +//! crate without colliding — see [`cache_dir`]/[`config_dir`]. [`LAUNCHER_APP`] +//! is the one identity every *launcher* host (as opposed to some unrelated +//! future consumer of `cache_dir`/`config_dir`) should actually pass — see +//! its own doc comment for why. mod desktop; mod history; @@ -27,3 +30,23 @@ pub use icon::IconCache; pub use launch::{do_launch, emit_launched}; pub use matching::{fuzzy_matches, fuzzy_score, load_sorted_entries, matches_term, priority_rank}; pub use paths::{app_dirs, cache_dir, config_dir, home_dir}; + +/// The launcher's one shared identity, passed to [`cache_dir`]/[`config_dir`]/ +/// [`IconCache::new`]/[`LaunchHistory::load`] by every host that embeds this +/// crate — breadbox's overlay window AND breadbar's embedded capsule +/// (theme 04/spotlight) alike. +/// +/// This is deliberate, not a leftover of breadbox being first: theme 04's +/// whole premise is that breadbar's capsule IS the launcher wearing a +/// different shell, not a second launcher with its own history +/// (`THEME_SYSTEM_PLAN.md` §7). If each host passed its own binary name here, +/// the same physical launcher would rank a user's apps differently +/// depending on which theme happened to be active — the icon cache and +/// "most launched" ordering would silently fork in two. Sharing this +/// constant is what keeps them one launcher. +/// +/// Do not pass a bare `"breadbox"` string literal at a call site instead of +/// this constant — that reads exactly like an unfixed bug (breadbar naming +/// another app's identity) and invites a later "fix" that would quietly +/// break the shared history this constant exists to guarantee. +pub const LAUNCHER_APP: &str = "breadbox"; diff --git a/bread-theme/assets/shell/spotlight/spotlight.css b/bread-theme/assets/shell/spotlight/spotlight.css new file mode 100644 index 0000000..2f35183 --- /dev/null +++ b/bread-theme/assets/shell/spotlight/spotlight.css @@ -0,0 +1,73 @@ +/* CSS template for the spotlight builtin (bread-theme/src/shell/builtin.rs). + * Same scope and substitution rules as liquid-motion.css/glass-workbench.css: + * only the window/workspace/clock chrome the manifest's own concepts model. + * + * NOTE (unlike its two siblings): breadbar does not actually call + * `ShellTheme::css()` today — its live stylesheet is the hand-written, + * token-driven `breadbar::theme::load_css()`, which is where the capsule's + * real chrome (dots, `.launcher-entry`, `.bread-drawer`/results rows) lives. + * This file exists so the manifest's own template mechanism stays exercised + * for all three builtins equally (and so a future `bread-theme` CLI/test + * that DOES call `.css()` sees a real spotlight template) — see + * `ShellTheme::css`'s own doc comment for why that gap between "what the + * manifest models" and "what breadbar actually renders" is pre-existing, + * not new to this file. + * + * Source: bos-ui-demos/04-spotlight.html's