aboutsummaryrefslogtreecommitdiffstats
path: root/mail-overview/mail-notify.sh
AgeCommit message (Collapse)AuthorFilesLines
12 hoursfix(mail-overview): don't re-notify the prior batch, flatten newlinesDanilo M.1-5/+7
The lastmod range is inclusive at both ends and the stored revision was reused as the next start, so the batch just notified matched again. Start one revision later. A subject can contain a newline, which broke the bullet rows and the +N more count; flatten CR/LF to a space before escaping. Also reconciles the state-write comment and spec with the actual skip-and-advance failure behavior, and corrects two doc wordings.
13 hoursfix(mail-overview): pass the mail icon by absolute pathDanilo M.1-2/+9
dunst here resolves a themed icon name only through icon_path, which holds no mail icon, so the name rendered nothing and dunst stored an empty icon_path. An absolute path resolves, which is what this machine's other notifiers already do.
13 hoursfeat(mail-overview): split notification heading and use theme iconDanilo M.1-4/+6
The user's dunst format renders %a bold on the top line and %s italic below it, so the app name now carries "New Mail" and the summary carries "<account> (<count>)". mail-unread is not in the active icon theme; mail-unread-multiple is.
13 hoursfeat(mail-overview): title, icon and spaced bullet bodyDanilo M.1-10/+11
A live test showed the old title ("<label> · N new") read poorly and the body packed the rows into one block. Title is now "New Mail - <label> (N)" with the mail-unread icon, and each message is a bullet on its own line with a blank line between. +N more counts rows, not physical lines, so the blank lines do not skew it.
13 hoursfeat(mail-overview): notify per account when mail arrivesDanilo M.1-1/+128
Asks notmuch what changed since the revision last seen, then sends one notification per account with mail in that window. Counts are validated as integers because a rejected notmuch query prints nothing and exits 1, and an empty string must not read as zero. dunstify is backgrounded because -b blocks until the notification is dismissed, which would otherwise stall the loop for the full timeout on every account. The watch is on the xapian directory rather than a file inside it, because a commit replaces files and a watch held on a filename dies with it.
13 hoursfeat(mail-overview): track the notified revisionDanilo M.1-0/+37
Stores the database UUID beside the revision, because notmuch revisions only compare within one database and a rebuild restarts the counter. Missing, corrupt or mismatched state reports nothing, which the caller treats as seed-silently: with no floor, lastmod:0.. matches every unread message and startup becomes a wall of popups.
13 hoursfeat(mail-overview): build notification bodiesDanilo M.1-0/+30
Three rows of author and subject, then +N more, which bounds the height so a mailing list burst is not a wall. Markup characters are escaped because dunst renders body markup and a subject is untrusted text off the internet.
13 hoursfeat(mail-overview): parse accounts for the notifierDanilo M.1-0/+43
Same source the drawer parses, so adding an account in qtmaildir notifies with no edit here. Keys run to the closing bracket because real ones contain dots, and parsing walks lines because a folder named [Gmail]/Bozze ends a section body early.
13 hoursfeat(mail-overview): skeleton for the arrival notifierDanilo M.1-0/+46
A library guard so the test can source the script for its pure functions without starting a watch loop, and the check itself, which is one bash script rather than a framework.