mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-03 07:15:29 -04:00
osc: implement iTerm2’s OSC-9 - desktop notifications
This commit is contained in:
parent
dd43afd754
commit
405b887a82
3 changed files with 10 additions and 1 deletions
7
osc.c
7
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue