On 14Feb2021 06:48, Bhaskar Chowdhury <unixbhas...@gmail.com> wrote:
>.....but depending too much of other software makes it fragile and 
>prone to
>error and least to say it is complex.

Aye. But you asked. You can see from the opening comment of the alert 
script:

    # Write a possibly-colourised string to the alert log.

that it has evolved a bit over time.

>Ordinary mortals(i.e me) who has less technical bend of mind, will run 
>away from this.

The core point here is the flow:
- getmail => folder
- mailfiler to file messages from the folder
- some messages run the alert script, which contains whatever 
  platform-specific popup incantation is required

All the rest has to do with my environment.

If you're using fetchmail+procmail, for example, you just need an 
"alert" rule at the right points in your rules.

>I do understand simplicity can not achieved without by digging and 
>getting into the rabbit
>hole...again but...how many are willing(including me, I am an truest sense lazy
>person) ...

You can use all my code of course. I'm well aware that even taking 
what's needed (==> implied, the box of tissues effect) and putting it 
into your own setup is not necessarily trivial.

>Not to deny, I do fall on fetchmail , procmail et al along with 
>mutt(the love for something do wonder) , but more to it ...nope...
>
>>The "desktop alert" part of that script is in the $to_desktop
>>if-statement at the bottom. Presently I'm on a Mac and use the
>>"terminal-notifier" command to issue a normal Mac Notification popup.
>>I'd be using whatever Linux desktop notification command line were
>>suitable were I on Linux.
>>
>notify-send is the "lightest" and "efficient" way of doing it on Linux.

Thanks. I'll look it up and stick it in. The whole point of the script 
is to remove platform "how do I alert" from everything else.

>Finally, I don't have the ability to create something native(think of 
>it as
>excuse not to put effort,if you like :) ) OR we don't want mutt to be 
>convoluted
>with some "airy-fairy" stuff.
>
>I am happy with it's limitation(partly because of my lack of understanding and
>as mentioned ability to extends it,being using it for long time 
>though).

Incremental change. Start with something basic. Modify it to better fit 
what you actually desire as its shortcomings become apparent. That's 
what I do. I've just been doing it a bit longer.

For example, your own "alert" script might just directly invoke 
notify-send and do nothing else. Mine started by writing coloured alerts 
to a text file, nothing else.

Then stick your own "alert" in your rules, and modify alert separately 
without needing to hack outside the script.

Cheers,
Cameron Simpson <c...@cskk.id.au>

Reply via email to