I often have long-running processes in comint shells (e.g. SQL or fitting statistical models, both usually via an R/ESS shell).
While they're running I navigate away and do something in another buffer, and try to remember to check-back periodically. I often check-back too soon, and then get distracted.
It would be ideal if I could write a function to trigger an informative system notification using notifications.el, whenever a process left running in a comint buffer completed (for any process, which, say, had already taken longer than 90 seconds).
How could I write such a function, to produce a system-notification such-as "A process in [buffer-name] has completed."?