feat(ui): add dedicated calm block screen mode and auto-launch from daemon

This commit is contained in:
2026-10-02 18:06:43 +03:00
parent 9e44bd4b32
commit 4ef9674fde
2 changed files with 10 additions and 1 deletions
+8
View File
@@ -167,6 +167,14 @@ fn enforce_if_blocked(
&format!("Blocker: {target_name} blocked"),
"Focus blocked by active schedule",
);
// Launch the calm block screen GUI in the background if available
let ui_exe = std::env::current_exe()
.ok()
.and_then(|p| p.parent().map(|d| d.join("blocker-ui")))
.unwrap_or_else(|| std::path::PathBuf::from("blocker-ui"));
let _ = std::process::Command::new(ui_exe).arg("--block").spawn();
1
}
Err(e) => {