From f32084dad7d0b9773cd5234b30a21b013e789f34 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 29 Jun 2026 11:11:42 +0200 Subject: Document idempotent start (noclobber PID claim) in README Co-Authored-By: Claude Opus 4.8 --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f62c96d..75b92b1 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,10 @@ breaktimer.sh status # print state, phase, seconds remaining refuse if a daemon is already running.) Auto-start on login by adding `breaktimer.sh start` to your compositor's -autostart (e.g. Hyprland `exec-once`, Sway `exec`). +autostart (e.g. Hyprland `exec-once`, Sway `exec`). `start` is idempotent: +`run_loop` claims the PID file atomically (`noclobber`), so a second `start` — +or a fast double-login — can't spawn a duplicate daemon; the loser aborts and a +stale PID file from a previous session is taken over, not duplicated. ## Configuration -- cgit v1.2.3