rpwoodbu / mosh-chrome

Mosh for Chrome
GNU General Public License v3.0
372 stars 59 forks source link

desktop notification support? #157

Open jgallen23 opened 7 years ago

jgallen23 commented 7 years ago

Any chance we can leverage http://www.rosipov.com/blog/desktop-notifications-from-chrome-secure-shell/ to add notifications in mosh?

rpwoodbu commented 7 years ago

Mosh for Chrome already uses hterm, which is the terminal emulator used by Secure Shell. There is already a desktop notification facility that has been there for a while (thanks, @mjkelly), but I think it just pops up on receipt of BEL; perhaps it has gotten more robust. It is possible that simply updating Mosh for Chrome to the latest hterm will unleash this new capability!

One thing to note, however: Mosh does not guarantee that all bytes make it to the screen (it is this lack of guarantee which is central to the greatness that is Mosh). So any such notification could easily go missing, particularly if your connectivity is coming in and out. Caveat emptor.

keithw commented 7 years ago

FWIW, Mosh does guarantee eventual delivery of BELs (but many BELs may be compacted into just one).

So if an application sends a BEL, the client will eventually get a BEL if it ever comes back (even if every cell in the terminal has long been rewritten with something else).