hterm: support arbitrary notifications from shell scripts |
|||
Issue descriptionthere's not a lot of prior art that i can find here. most terminals don't support this at all and instead expect people to use tools like `notify-send` or `kdialog` or `dbus-send` to trigger native reaction. i have found some that do though. iTerm2: - https://www.iterm2.com/faq.html - \e]9;Growl Notification\007 rxvt-unicode: - http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.7.pod - not directly supported, but has a plugin model where OSC 777 can trigger any module, and there's a standard "notify" module there. - \e]777;notify;<title>;<body>\a terminology: - supports the rxvt-unicode method (although the code says "xterm", they really meant "rxvt-unicode") - https://git.enlightenment.org/apps/terminology.git/tree/src/bin/termptyesc.c?h=v1.0.0#n1297 i'm inclined to implement the 777;notify approach since it has both title & message support.
,
Jun 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/apps/libapps/+/913227a00f675a525f2d35bfc6d4d0712b555420 commit 913227a00f675a525f2d35bfc6d4d0712b555420 Author: Mike Frysinger <vapier@chromium.org> Date: Thu Jun 29 21:12:14 2017 hterm: add a notification icon Most notifications by default have a blank space. Fill it out with our default hterm icon -- an angry terminal. BUG= chromium:735780 Change-Id: I2c126fca3d18adf67e3521c1a722c3cc20b7a7dd Reviewed-on: https://chromium-review.googlesource.com/551337 Reviewed-by: Brandon Gilmore <varz@google.com> Tested-by: Mike Frysinger <vapier@chromium.org> [add] https://crrev.com/913227a00f675a525f2d35bfc6d4d0712b555420/hterm/images/icon-96.png [modify] https://crrev.com/913227a00f675a525f2d35bfc6d4d0712b555420/hterm/concat/hterm_resources.concat [modify] https://crrev.com/913227a00f675a525f2d35bfc6d4d0712b555420/hterm/js/hterm.js
,
Jun 29 2017
this is in hterm-1.66+ and nassh-0.8.36.6+
,
Jun 29 2017
,
Jun 29 2017
for posterity, this is documented here: https://chromium.googlesource.com/apps/libapps/+/master/hterm/doc/ControlSequences.md#OSC example of the formats: printf '\x1b]9;title\a' printf '\x1b]777;notify;title;body\a'
,
Aug 4 2017
The following revision refers to this bug: https://chromium.googlesource.com/apps/libapps/+/10a9b1b5eaf4003e5d48039bc3a277afd4b94c6b commit 10a9b1b5eaf4003e5d48039bc3a277afd4b94c6b Author: Mike Frysinger <vapier@chromium.org> Date: Fri Aug 04 20:37:09 2017 nassh: FAQ: document screen/tmux pass thru Should help people use hterm specific sequences like notifications. Throw in a helper notify script for fun, and update the osc52 one to support tmux. BUG= chromium:735780 Change-Id: Ia59b049776a4faa81ec08f3c2f71fcddacb1241f Reviewed-on: https://chromium-review.googlesource.com/601549 Reviewed-by: Ruslan Osipov <ruslano@google.com> Reviewed-by: Brandon Gilmore <varz@google.com> Tested-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/10a9b1b5eaf4003e5d48039bc3a277afd4b94c6b/hterm/etc/osc52.sh [modify] https://crrev.com/10a9b1b5eaf4003e5d48039bc3a277afd4b94c6b/nassh/doc/FAQ.md [add] https://crrev.com/10a9b1b5eaf4003e5d48039bc3a277afd4b94c6b/hterm/etc/hterm-notify.sh |
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, Jun 29 2017