LukeSmithxyz / mutt-wizard

A system for automatically configuring mutt and isync with a simple interface and safe passwords
GNU General Public License v3.0
2.41k stars 383 forks source link

Display sending account in mailsync notify #905

Closed TheChymera closed 1 year ago

TheChymera commented 1 year ago

It's pretty cool that the mailsync script can create desktop notifications via notify-send. Any idea how the actual address sending the mail can be listed in the message — and if so, any interest in adding this as the default style?

As it stands, all info provided other than the account, is rather low-priority ..."New mail!" "📬 $2 new mail(s)... I mean it already says new mail once... The most informative info to display is either the sender or the title (though the title might be arbitrarily long). Adding the sender also makes it easier to customize notifications via libnotify.

Tried to hack this myself, but I don't think it works just via editing the text in the current version, because it's laid out to just count the emails, and not to display a notification for one email at a time.

LukeSmithxyz commented 1 year ago

Actually, if you look way back in the commits, the script used to do not only this, but included the subject of the message.

It's not hard to do at all, but I had removed the feature just because, let's say if you get a bunch of email at once, or emails that might have some semi-sensitive information---I just didn't want that to be the default functionality.

This was removed in 8d177222d6d07ada68930a64a0f7a2e320817094 and you can see how it's done.

I am open to readding it. It displayed individual message content if there are fewer than five new mails.

TheChymera commented 1 year ago

@LukeSmithxyz sry for the slow feedback, I've been trying the mailsync from 8d177222d6d07ada68930a64a0f7a2e320817094~1 and I'm pretty happy with it. Wanted to set up an optional parameter for whether to display sender+title (and also add the account to the --app-name or some other place where libnotify can pick it up for styling) or alternatively just have it the way it is now, but I keep putting it off.

Is this something that you'd be interested in doing as well, or too much of a hassle for something you don't personally need?

TheChymera commented 1 year ago

Actually, just keep the issue open for a few more weeks, I think I'll come up with a PR you'll like.

LukeSmithxyz commented 1 year ago

I had some time today and substantially rewrote a lot in this repository, in the meantime, I readded this feature. No command-line options. The default shows notifications, and users can set the MAILSYNC_MUTE variable if they want it quiet.

Shane-XB-Qian commented 1 year ago

@LukeSmithxyz in mw line 220 about mailsync -q to sync mail in cron, that perhaps should remove -q , seems not such parametr anymore.

Shane-XB-Qian commented 1 year ago

pr #908 raised to refine this.