aboutsummaryrefslogtreecommitdiffstats
path: root/mail-overview/waybar-mail.sh
AgeCommit message (Collapse)AuthorFilesLines
17 hoursfeat(mail-overview): waybar watcher in continuous modeDanilo M.1-0/+66
Prints one JSON line per notmuch commit rather than polling on an interval, so the count drops the moment mail is read in qtmaildir and rises the moment mbsync commits, and waybar owns the watcher process: nothing to supervise on a machine with no systemd. The watch is on the xapian directory, not on a file inside it, because a commit replaces files and a watch held on a filename dies with it. The short sleep coalesces the several writes of one commit into one redraw. notmuch exits 0 even for a malformed query, printing something that is not a count, so the output is validated as an integer rather than trusting the exit status. A failure there renders as an error glyph: a count that silently reads zero would look exactly like an empty inbox. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WWL8JYHu7yhAdtx5pU9PMU