fix(idle): lock with pgrep -xf breadlock so listen does not swallow lock_cmd #94

Merged
Breadway merged 1 commit from fix/bos-92-idle-lock into main 2026-10-20 11:19:25 +08:00
Owner

lock_cmd = pidof breadlock || breadlock never starts a locker. breadlock listen is autostarted at login, so pidof breadlock is always true and the || breadlock that actually locks never runs. Super+L (loginctl lock-session), the idle lock and the lock before suspend are all no-ops.

The command is now pgrep -xf breadlock >/dev/null || breadlock, which matches only a process whose whole argv is exactly breadlock and not breadlock listen. A second locker is still suppressed, and breadlock's own singleton handles the already-locked case.

Existing installs keep the old line until BOS Settings rewrites it. That rewrite is bos-settings PR for the same card, and it replaces only this exact command, leaving a hand-written lock_cmd alone.

Refs BOS-92

`lock_cmd = pidof breadlock || breadlock` never starts a locker. `breadlock listen` is autostarted at login, so `pidof breadlock` is always true and the `|| breadlock` that actually locks never runs. Super+L (loginctl lock-session), the idle lock and the lock before suspend are all no-ops. The command is now `pgrep -xf breadlock >/dev/null || breadlock`, which matches only a process whose whole argv is exactly `breadlock` and not `breadlock listen`. A second locker is still suppressed, and breadlock's own singleton handles the already-locked case. Existing installs keep the old line until BOS Settings rewrites it. That rewrite is bos-settings PR for the same card, and it replaces only this exact command, leaving a hand-written lock_cmd alone. Refs BOS-92
Sign in to join this conversation.
No description provided.