Emit bread.box.launched after a successful app launch
All checks were successful
check / check (push) Successful in 16s
dev release / build (push) Successful in 33s

Link bread-utils bread-client (tag v0.7.1) from the breadbox crate.
Fire-and-forget via BreadClient; silent if breadd is down. No command
verbs — breadbox is not a daemon. EVENTS.md is the contract (app id box).
This commit is contained in:
Breadway 2026-08-15 22:14:42 +08:00
parent e5ce91a9c9
commit 1b02cec0a6
6 changed files with 93 additions and 7 deletions

View file

@ -54,6 +54,9 @@ pub fn app_dirs() -> Vec<PathBuf> {
#[derive(Debug, Clone)]
pub struct DesktopEntry {
/// Desktop file id (the `.desktop` filename, e.g. `firefox.desktop`).
/// Empty only if the path had no file name; callers fall back to `exec`.
pub id: String,
pub name: String,
pub exec: String,
pub icon_name: String,
@ -155,7 +158,14 @@ pub fn parse_desktop(path: &Path) -> Option<DesktopEntry> {
.map(|s| s.to_string())
.collect();
let id = path
.file_name()
.map(|n| n.to_string_lossy().into_owned())
.filter(|s| !s.is_empty())
.unwrap_or_default();
Some(DesktopEntry {
id,
name,
exec,
icon_name,