From 405b887a82ec83cf8423378ae4f4f92226998905 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 2 Jun 2021 17:50:29 +0200 Subject: osc: implement iTerm2’s OSC-9 - desktop notifications MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- osc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'osc.c') diff --git a/osc.c b/osc.c index f5aa86a2..7e934c72 100644 --- a/osc.c +++ b/osc.c @@ -521,7 +521,7 @@ osc_notify(struct terminal *term, char *string) const char *title = strtok_r(string, ";", &ctx); const char *msg = strtok_r(NULL, "\x00", &ctx); - notify_notify(term, title, msg); + notify_notify(term, title, msg != NULL ? msg : ""); } static void @@ -678,6 +678,11 @@ osc_dispatch(struct terminal *term) osc_uri(term, string); break; + case 9: + /* iTerm2 Growl notifications */ + osc_notify(term, string); + break; + case 10: case 11: case 17: -- cgit v1.3