aboutsummaryrefslogtreecommitdiff
path: root/osc.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-06-04 05:44:07 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-06-04 05:44:07 +0000
commitb5515a414ad133bb6e286bb0470ca09bff13d7c7 (patch)
tree7de5c631bc1d3a6e392bf58841fb9cb2d790b3cf /osc.c
parentMerge branch 'chunked-reflow' (diff)
parentosc: implement iTerm2’s OSC-9 - desktop notifications (diff)
Merge branch 'osc-9'
Diffstat (limited to 'osc.c')
-rw-r--r--osc.c7
1 files changed, 6 insertions, 1 deletions
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: